Created
January 6, 2015 19:59
-
-
Save belano/b0a20b0cb12ed64ed87f to your computer and use it in GitHub Desktop.
Install yolk automatically each time you create a virtual env via postmkvirtualenv file
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/bash | |
# This hook is run after a new virtualenv is activated. | |
PYTHON_VERSION=`python -c 'import sys | |
print (sys.version_info.major)'` | |
case $PYTHON_VERSION in | |
2) | |
echo "Version 2+" | |
pip install yolk | |
;; | |
3) | |
echo "Version 3+" | |
pip install --upgrade yolk3k | |
;; | |
*) | |
echo "Wrong version or no python, skipping" | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment