Created
April 29, 2010 17:05
-
-
Save ecarter/383894 to your computer and use it in GitHub Desktop.
virtualenvwrapper hooks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# virtualenv, virtualenvwrapper, & pip settings - http://www.doughellmann.com/docs/virtualenvwrapper/tips.html | |
export WORKON_HOME=$HOME/.virtualenvs | |
export PIP_VIRTUALENV_BASE=$WORKON_HOME | |
export PIP_RESPECT_VIRTUALENV=true | |
source /usr/local/bin/virtualenvwrapper.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This hook is run after every virtualenv is activated. | |
# Create project work directory - http://www.doughellmann.com/docs/virtualenvwrapper/tips.html#creating-project-work-directories | |
proj_name=$(echo $VIRTUAL_ENV|awk -F'/' '{print $NF}') | |
cd ~/projects/$proj_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This hook is run after a new virtualenv is activated. | |
# Create project work directory - http://www.doughellmann.com/docs/virtualenvwrapper/tips.html#creating-project-work-directories | |
proj_name=$(echo $VIRTUAL_ENV|awk -F'/' '{print $NF}') | |
mkdir $HOME/projects/$proj_name | |
add2virtualenv $HOME/projects/$proj_name | |
cd $HOME/projects/$proj_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment