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.2.tar.gz (5.5 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.2-py2.py3-none-any.whl (6.8 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for penv-0.2.tar.gz
Algorithm Hash digest
SHA256 53d470a0b9983609e9837e5a08a17cb60723d563ad628a0a8505d207c7049c88
MD5 bddf9e62b09c9a91723bc999580f9790
BLAKE2b-256 a4744be78430e5210769fd1d175ab1ac18dc7f2e0ecedbef470ac4b2616a8398

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for penv-0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 16446f5f05e0417770e9d2f8e0187311a0c2d17d1a3117e7b53a6b088cb4cc42
MD5 963799ceddad2c6a2eba003ad5a3c979
BLAKE2b-256 98d4064f3a4182cf3ed833cdeb0379c6d7920b99d39b7e22b96c25932b6a4c68

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