-
-
Save mkohler/b7a3233bccd1474e824e to your computer and use it in GitHub Desktop.
Revisions
-
mkohler revised this gist
Jul 1, 2014 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ #!/bin/sh cp postmkvirtualenv ~/.virtualenvs -
mkohler revised this gist
Jul 1, 2014 . 1 changed file with 6 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,12 @@ #!/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) ) @@ -14,4 +18,4 @@ 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 -
José Luis Lafuente revised this gist
Nov 1, 2012 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -2,16 +2,16 @@ # This hook is run after a new virtualenv is activated. # ~/.virtualenvs/postmkvirtualenv libs=( PyQt4 sip.so ) 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 -
José Luis Lafuente created this gist
Mar 15, 2012 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ #!/bin/bash # This hook is run after a new virtualenv is activated. # ~/.virtualenvs/postmkvirtualenv LIBS=( PyQt4 sip.so ) 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