Requires-Dist: unittest2; 'test' in extras
Proposal: Requires-Dist: unittest2; 'test' in extras ... I noticed very few packages (I counted 644 out of 16k) actually include Requires: in the sdist PKG-INFO, 5 with Requires-Dist. (requires.txt is much more common.)
On Wed, May 30, 2012 at 5:35 PM, PJ Eby
On Wed, May 30, 2012 at 3:09 PM, Daniel Holth
wrote: It looks like you can only install one extra at a time,
Actually, you can specify more than one, using commas. e.g. "easy_install foo[testing,c-extensions,celery-support,...]".
Would we want this to look the same way for pysetup? Something like `pysetup install foo[tests,docs]`? That would be a pretty nice way to handle docs, tests, and other miscellaneous extra requirements. I like the idea of using environment markers for that and not having to add any new metadata fields. Using an environment marker might also work for some kind of build-requires, though support for that would still require some special machinery. Erik
On Thu, May 31, 2012 at 11:24 AM, Erik Bray
On Wed, May 30, 2012 at 5:35 PM, PJ Eby
wrote: On Wed, May 30, 2012 at 3:09 PM, Daniel Holth
wrote: It looks like you can only install one extra at a time,
Actually, you can specify more than one, using commas. e.g. "easy_install foo[testing,c-extensions,celery-support,...]".
Would we want this to look the same way for pysetup? Something like `pysetup install foo[tests,docs]`? That would be a pretty nice way to handle docs, tests, and other miscellaneous extra requirements. I like the idea of using environment markers for that and not having to add any new metadata fields.
Using an environment marker might also work for some kind of build-requires, though support for that would still require some special machinery.
Since I haven't used pysetup yet, I couldn't really say. I can say that some people have mentioned that they find setuptools' "extras" mechanism to be confusing, unnecessary, or a tool in search of a usecase. I'm not terribly attached to them, but I prefer them to the solution that e.g. Celery uses. Celery has various dummy distributions on PyPI like "celery-with-couchdb" that exist only to pull in extras, and it only needs them because some packaging tools don't support extras. (ISTR that pip doesn't support them.)
I will implement Requires-Dist: somedist; extra == 'name' and consider install package[extra1, extra2] to be sugar for install package package[extra1] package[extra2] It is easier to maintain a precomputed key : requirements mapping that way.
On 05/31/2012 09:04 AM, PJ Eby wrote:
Since I haven't used pysetup yet, I couldn't really say. I can say that some people have mentioned that they find setuptools' "extras" mechanism to be confusing, unnecessary, or a tool in search of a usecase. I'm not terribly attached to them, but I prefer them to the solution that e.g. Celery uses. Celery has various dummy distributions on PyPI like "celery-with-couchdb" that exist only to pull in extras, and it only needs them because some packaging tools don't support extras. (ISTR that pip doesn't support them.)
Pip supports extras since version 1.1, released a couple months ago. FWIW. Carl
participants (4)
-
Carl Meyer
-
Daniel Holth
-
Erik Bray
-
PJ Eby