Saturday 27 July 2013

pip - including one requirements file from another

I’d always had a few requirements files in my Django projects, dev.txt and production.txt were the standard ones.

However it had always irked me having to do something like this:

 pip install -r dev.txt -r production.txt 

Ok, it’s only a few keystrokes, but none the less I’m repeating myself. Today I learned that I can include one requirements file from another doing something like this in dev.txt –

 -r production.txt django-debug-toolbar==0.9.4 

Wow, such a simple thing but my mind is blown. Simple things eh?