(In other words, NIH version of virtualenvwrapper)
cd ~/project/proj1
pp-mk Project1 3.5.2 # Create a new virtualenv with the name "Project1"
# Equivalent to: pyvenv ~/.pyvenv/Project1
# In this case, we will base the new venv on Python 3.5.2
# (previously installed through pyenv)
source pp-activate # Project1 is activated
# Equivalent to: source ~/.pyvenv/Project1/bin/activate
# Note that the project name is automatically
# detected using a hidden file in the current directory
#... work on Project1
deactivate # Same as with pyvenv
Create a new environment with the given name. All argument switches are passed along to pyvenv
.
If no name is provided, we will use the name of the current directory.
If the provided env_name
differs from current directory, it is stored in a hidden local file .papy
.
If you use pyenv, you can also specify the python version to use. Equivalent to activating a pyenv shim and then running pyvenv on top of that.
Activate an environment with the given name. If name is not provided, the environment is detected based on the current directory.
List available environments from ~/.pyvenv
You can set environmental variables to change some of the settings. You can find what's available
in pp-common
.
Linux or Mac, reasonably recent bash.
- Clone this repository
- Add cloned directory to PATH
You can also copy the files into your bin folder. Example (from inside the cloned repository):
sudo cp ./pp-* /usr/local/bin/
Tested on Mac, homebrew bash. Seems to be working fine. Use at your own risk.
MIT