Join GitHub today
Support markers in requirements files #1433
I'm working on the OpenStack project which uses "requirements.txt" text files to list dependencies. The problem is that there are dependencies which are Python 2 specific, whereas others are only working on Python 3. I need a way to specify that such dependency is only for Python 2 or only for Python 3. Supporting markers in requirements.txt would be a generic solution, example of syntax:
Python 2 would install iso8601 and mox, Python 3 would install iso8601 and mox3.
Another usecase. I'm working on a port of the new Tulip project (written for Python 3.3+) on Python 2: Trollius. Trollius uses backports of Python 3 modules for Python 2. Trollius on Python 2.7 requires futures, on Python 2.6 it requires futures and ordereddict.
I don't see how to specify in requirements.txt that I don't want to install ordereddict on Python 2.7 (collections.OrderedDict is already available), but only on Python 2.6.
(Trollius is not related to tox or OpenStack, at least, not yet :-))