-
-
Save mkohler/b7a3233bccd1474e824e to your computer and use it in GitHub Desktop.
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/sh | |
cp postmkvirtualenv ~/.virtualenvs |
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 | |
# Since "pip install pyqt4" doesn't work for whatever reason, this | |
# script puts the global version of PyQt and SIP in each virtualenv. | |
# This hook is run after a new virtualenv is activated. | |
# ~/.virtualenvs/postmkvirtualenv | |
libs=( PyQt4 sip.so sipconfig.py sipconfig_nd.py sipdistutils.py ) | |
python_version=python$(python -c "import sys; print (str(sys.version_info[0])+'.'+str(sys.version_info[1]))") | |
var=( $(which -a $python_version) ) | |
get_python_lib_cmd="from distutils.sysconfig import get_python_lib; print (get_python_lib())" | |
lib_virtualenv_path=$(python -c "$get_python_lib_cmd") | |
lib_system_path=$(${var[-1]} -c "$get_python_lib_cmd") | |
for lib in ${libs[@]} | |
do | |
ln -s $lib_system_path/$lib $lib_virtualenv_path/$lib | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment