Created
August 25, 2014 23:11
-
-
Save aodj/562e897ab65a673e0f97 to your computer and use it in GitHub Desktop.
step #3
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 | |
tar xvzf virtualenv-1.11.6.tar.gz | |
cd virtualenv-1.11.6 | |
sudo python virtualenv.py ../$1 | |
cd .. | |
# activate the virtualenv, install the requirements | |
source $1/bin/activate | |
sudo pip install -r mac_requirements.txt | |
# symlink wx.pth in | |
sudo ln -s /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wxredirect.pth ./$1/lib/python2.7/site-packages | |
# cleanup a bit | |
rm -rf virtualenv-1.11.6 | |
deactivate | |
cd $1/bin | |
# rename the python interpreter because wx doesn't like to play with others | |
sudo mv python python_original | |
# symlink in the framework build so we can instantiate wx.App objects | |
sudo ln -s /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 ./python # this means we use the framework build for wx stuff | |
cd ../.. | |
# export the PYTHONHOME variable so that interpreters use our libraries | |
sudo sh -c "echo export PYTHONHOME=$PWD/$1 >> $1/bin/activate" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment