开发者

Does setup.py's extras_require keyword support comma-separated extras?

开发者 https://www.devze.com 2022-12-21 05:07 出处:网络
Setuptools lets you list requirements for optional features # mypackage \'extras_require\' : { \'PDF\' : [\'reportlab\'], \'DOCX\' : [\'docxlib\'] }

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' : [ 开发者_JS百科'mypackage[PDF, DOCX]' ]?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号