[Distutils] Upcoming changes to PEP 426/440

Nick Coghlan ncoghlan at gmail.com
Sun Jun 30 10:00:57 CEST 2013


On 30 June 2013 17:44, Vinay Sajip <vinay_sajip at yahoo.co.uk> wrote:
> Nick Coghlan <ncoghlan <at> gmail.com> writes:
>
>> Donald has been continuing his data modelling work for Warehouse (aka
>> PyPI 2.0: https://github.com/dstufft/warehouse) and found that the
>> *_requires/*_may_require split for dependencies was significantly more
>> painful to work with than I had expected.
>
> Has there been any public discussion about this? I'm just curious about what
> the difficulties were.
>
>> 1. The "*_may_require" fields are all going away (leaving only the
>> "*_requires" fields)
>>
>> 2. The "*_requires" fields are becoming lists of "dependency
>> specifier" mappings rather than strings
>
> I'm wondering if this area could be simplified further. For example, can't
> we lose test_requires, meta_requires, build_requires and dev_requires just
> by stating that "test", "meta", "build" and "dev" are reserved extra names
> which don't need to be explicitly defined in "extras"? Then you get just one
> list of dependency specifiers, which can be readily filtered to provide what
> is currently provided by {test,meta,build,dev}_requires. It seems to lead to
> a very simple data model, as well as making the JSON schema more concise.

No, because the semantic dependencies form a Cartesian product with
the extras. You can define :meta:, :run:, :test:, :build: and :dev:
dependencies for any extra. So if, for example, you have a "localweb"
extra, then you can define extra test dependencies for that.

The semantic specifiers determine *which sets of dependencies* you're
interested in, while the explicit extras define optional subsets of
those.

Cheers,
Nick.

--
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Distutils-SIG mailing list