Skip to content

@ianb /gist:1368649
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
pip vendor libs
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
Something went wrong with that request. Please try again.