Skip to content

Instantly share code, notes, and snippets.

@belano
Created January 6, 2015 19:59
Show Gist options
  • Save belano/b0a20b0cb12ed64ed87f to your computer and use it in GitHub Desktop.
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
#!/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