I have a python project that has a few dependencies (defined under install_requires in setup.py). My ops people requires a package to be self contained and only
install_requires
It's possible to do this with recent versions of pip (I'm using 8.1.2). On the build machine:
pip
pip install -r requirements.txt --prefix vendor
Then run it:
PYTHONPATH=vendor/lib/python2.7/site-packages python yourapp.py
(This is basically an expansion of @valentjedi comment. Thanks!)