Skip to content

Instantly share code, notes, and snippets.

Created November 15, 2011 22:58
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
pip vendor libs
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