Skip to main content

Framework for ease project management tools building.

Project description

Framework for ease project management tools building.

Principal rule is like autoenv from Kenneth Reitz but with more fun. It basically allows you to create plugins (in Python) that are activated/deactivated then entring/leaving project directory (directory that contains “.penv”)

Installation:

$> pip install penv

# And put following to your .bashrc
# eval "`penv --override-cd-bash`"

Usage:

# overriden "cd" function generation
$> penv --override-cd-bash

# Generated output is following:
#
# function cd () {
#     builtin cd "$@" && eval "$(penv scan)"
# }
#
# so that's why, in order to activate it, you should put
# following to your .bashrc:
#
# eval "`penv --override-cd-bash`"

So… what it does?

Well why not just ask program itself?:

# Case 1) - no ".penv"
$> cd /tmp
$> penv scan
# Scanning: /tmp | OLDPWD=/tmp
# Scanning: / | OLDPWD=/tmp
#
# ^^^^ haven't found anything but, as you can see, it doesn't
# stop when it fails immediatelly - it searches for ".penv"
# in parent directory, too.

# Case 2) with ".penv" directory
$> cd /tmp
$> penv scan
# Scanning: /tmp | OLDPWD=/tmp
#     new env found (/tmp/.penv) and it shouldn't be skipped, so generating activation scripts
#     ##############################
#     Following places will be checked for plugins existance:
#        /home/<user>/.penv/.plugins
#        /tmp/.penv/.plugins
#        /tmp/.penv-plugins
#     ##############################

# <GENERATE BASH CONTENT GOES HERE>

#     generation script done.

Basically it searches for “.penv” directory whereever you go with “cd” command (assuming you’ve installed it in .bashrc) and activates whatever plugins are generating.

Ok, so why it’s cool?

  1. It’s very simple: basically it’s just providing hooks for “cd” and “cd ..” commands. Allows you to activate environment or your own specific tools and deactivate them when your leaving project directory.

  2. Pluginable nature allows you to customize environment for each project and reuse plugins.

  3. When you’ll have to deal with 100 projects each having Makefile you have to maintain you’ll probably understand why two above reasons are important.

TODO

  • docs for plugins

  • some tests wouldn’t hurt

Authors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

penv-0.3.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

penv-0.3-py2.py3-none-any.whl (7.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file penv-0.3.tar.gz.

File metadata

  • Download URL: penv-0.3.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for penv-0.3.tar.gz
Algorithm Hash digest
SHA256 f88b8f07acde8f1db1eb8c8252ff4606c898d6bb01f4315b90b2b7613aa1159d
MD5 d13a7a2cbe97c2a9a9c8f1e94699b547
BLAKE2b-256 3797c89732df44dfaec986e12df2aa82c1ec94e6e9ae35e3df0c006457060e1e

See more details on using hashes here.

File details

Details for the file penv-0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: penv-0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for penv-0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 06e7d3759b869fafdd66e0f91e6a85eaf86c8cee1e143c830a840f192abff687
MD5 c8f4b806a0dbba5f7b38b72de84a7eaa
BLAKE2b-256 d93ee05cff9cd4f4630f5c92514c8c8b06fb9ad9c9a3460ffbae752b5fad9c01

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page