If your build server can access the packages via git and you want to install using requirements.txt
, you're in luck.
Installing Python Packages with git via requirements.txt
You can specify git based packages in requirements.txt
. Just put them on separate lines as if they were another package:
git+git://github.com/thadeusb/flask-cache.git
You can even pin to a specific commit using @
:
git+git://github.com/thadeusb/flask-cache.git@40cfd9280dc66ea54df0961420fc94853d506a35
Bonus Mode
If you want to pull from a repository in editable mode, prepend a -e
:
-e git+git://github.com/thadeusb/flask-cache.git@40cfd9280dc66ea54df0961420fc94853d506a35#egg=Flask-Cache
Roll your own PyPI Server
Though you didn't ask for it specifically, you could also roll your own Python Package Index.
Once you have it configured, you simply have to set the index-url
to fetch packages from. You can do this directly:
pip install --index-url=http://pip.razer.domain/ -r requirements.txt
Or set up a config file ~/.pip/pip.conf
:
[global]
index-url = http://pip.razer.domain/