Created
November 15, 2011 22:58
-
-
Save ianb/1368649 to your computer and use it in GitHub Desktop.
pip vendor libs
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
V=2.7 | |
rm -rf build-env | |
rm -rf vendor/setuptools-*.egg vendor/pip-*.egg | |
virtualenv --python python$V --no-site-packages build-env | |
mv build-env/lib/python$V/site-packages/ build-env/lib/python$V/orig-site-packages | |
(cd build-env/lib/python$V && | |
ln -s ../../../vendor site-packages && | |
cd ../.. && mv bin bin-orig && | |
ln -s ../vendor/bin bin && | |
mv bin-orig/python* bin/ ) | |
rm build-env/lib/python$V/orig-site-packages/easy-install.pth | |
mv build-env/lib/python$V/orig-site-packages/* build-env/lib/python$V/site-packages/ | |
rmdir build-env/lib/python$V/orig-site-packages | |
pip -E build-env install --install-option="--install-platlib=$(pwd)/vendor/binary-libs" -r prod-reqs.txt | |
# If you see something in vendor/binary-libs, it is a library that can't be a proper vendor lib | |
# Scripts in vendor/bin need to be fixed up | |
# You should ignore vendor/bin/python*, vendor/setuptools-*.egg vendor/pip-*.egg vendor/setuptools.pth |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment