Created
July 15, 2014 01:40
-
-
Save furagu/d8a7349c749f0f50483e to your computer and use it in GitHub Desktop.
My virtualenv setup for Mac OS X
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
# Python virtualenv setup | |
export WORKON_HOME=~/Envs | |
export VIRTUALENVWRAPPER_PYTHON=/opt/local/bin/python2.7 | |
export VIRTUALENVWRAPPER_VIRTUALENV=/opt/local/bin/virtualenv-2.7 | |
export VIRTUALENVWRAPPER_VIRTUALENV_CLONE=/opt/local/bin/virtualenv-clone-2.7 | |
source /opt/local/bin/virtualenvwrapper.sh-2.7 | |
has_virtualenv() { | |
if [ -e .venv ]; then | |
workon `cat .venv` | |
fi | |
} | |
venv_cd () { | |
cd "$@" && has_virtualenv | |
} | |
alias cd="venv_cd" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment