views:

75

answers:

1

Setuptools lets you list requirements for optional features

# mypackage
'extras_require' : { 'PDF' : ['reportlab'], 'DOCX' : ['docxlib'] }

and another package can specify 'requires' : [ 'mypackage[PDF]' ].

If another package wants to require more than one extra from the first package, can it ask for 'requires' : [ 'mypackage[PDF, DOCX]' ]?

+1  A: 

from: http://peak.telecommunity.com/DevCenter/setuptools#declaring-dependencies

setuptools and pkg_resources use a common syntax for specifying a project's required dependencies. This syntax consists of a project's PyPI name, optionally followed by a comma-separated list of "extras" in square brackets, optionally followed by a comma-separated list of version specifiers

...so your answer is yes

Terence Honles