[Distutils] setuptools: can I specify different install_requires for different python versions?
Sridhar Ratnakumar
SridharR at activestate.com
Wed Jul 29 00:31:48 CEST 2009
On Tue, 28 Jul 2009 13:00:44 -0700, P.J. Eby <pje at telecommunity.com> wrote:
> [1] One way to implement conditional requirements is to make use of
> Requirement.extras. If setuptools/distribute supports builtin extras -
> such as Py26, Py27, Py30 and so forth .. even Py3x to cover all 3.x
> versions - then one can have a [<Py26] section in their install_requires
> that would specify requirements specific to versions below 2.6.
> It would also need to support platform-specific requirements, and
> possibly other options as well.
Yes. Perhaps this can be made extensible/special by requiring that such
'special' sections start with a ':'. Example:
[:pyver<(2,6)]
multiprocessing<=2.2
[:platinfo.osname=windows]
wincurses
[:platinfo.osname=windows and platinfo.osarch=x64]
ssl64
where 'platinfo' is from http://code.google.com/p/platinfo/ (reason being:
platform names has to be from a *standard* set of names .. lest people use
whatever-comes-to-their-mind making it harder for some of us to,
programmatically, read and understand their metadata).
> which, however, means one has to run
> setup.py with all its silly hacks (raw_input() anyone?).
> Ew. Somebody actually did that? Please identify the culprit so they
> can be publicly shamed.
There are a handful .. and http://pypi.python.org/pypi/biopython is one of
them.
-srid
More information about the Distutils-SIG
mailing list