Skip to content

Instantly share code, notes, and snippets.

@aneilbaboo
Last active October 20, 2015 18:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aneilbaboo/2a23486d604b5d3f3a52 to your computer and use it in GitHub Desktop.
Save aneilbaboo/2a23486d604b5d3f3a52 to your computer and use it in GitHub Desktop.
This .rvmrc automatically creates/activates a python virtualenv
# save this file in the top level directory of your project as ".rvmrc"
# the virtualenv will be created/activated when you cd into the dir
if hash mkvirtualenv 2>/dev/null; then
virtualenv_name=$(basename `git rev-parse --show-toplevel`)
workon "$virtualenv_name"
if [ "$?" != "0" ]; then
mkvirtualenv "$virtualenv_name"
echo "\"pip install -r requirements.txt\" to install libraries"
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment