Skip to content

Instantly share code, notes, and snippets.

@ecarter
Created April 29, 2010 17:05
Show Gist options
  • Save ecarter/383894 to your computer and use it in GitHub Desktop.
Save ecarter/383894 to your computer and use it in GitHub Desktop.
virtualenvwrapper hooks
# 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
#!/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
#!/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