[Distutils] setuptools extras_require

Phillip J. Eby pje at telecommunity.com
Thu Apr 26 22:07:00 CEST 2007


At 12:50 PM 4/26/2007 -0500, Kumar McMillan wrote:
>On 2/9/07, Phillip J. Eby <pje at telecommunity.com> wrote:
>>At 09:29 AM 2/9/2007 -0500, Tres Seaver wrote:
>> > > Using "|" as a separator for ORing TurboGear's requirements might look
>> > > something like this (ignoring version numbers for simplicity):
>> > >
>> > > install_requires = [
>> > >         "SQLObject | SQLAlchemy",
>> > >         "Kid | Genshi",
>> > > ],
>> > > extras_require = {
>> > >         "fancy_tb": ["Paste"],
>> > > }
>> >
>> >+1 for the pipe symbol:  to my eye, it means "pick the first of these",
>> >which is what you want.
>>
>>It's also implementable; the tuple concept isn't.  Eggs' requirements get
>>stored in text files, so there has to be a pure-text representation possible.
>
>[blast from the past]
>I'd like to use ORed requirements in a setup file but I don't see what
>version of setuptools this was introduced in.  Does anyone know?

No, because it hasn't been done yet.  :)  I merely said it was 
implementable (in principle).

Note that any project using this format won't be compatible with 0.6 
versions of setuptools and will cause them to fail installation with 
parsing errors, unless there is some way to keep the alternatives hidden 
from older parsers.



More information about the Distutils-SIG mailing list