[Distutils] Draft PEP for JSON based metadata published

Nick Coghlan ncoghlan at gmail.com
Wed May 29 16:25:07 CEST 2013


On Thu, May 30, 2013 at 12:14 AM, Daniel Holth <dholth at gmail.com> wrote:
> Request the test extra to also install
>
> test_requires
> test_may_require
> "
>
> If test requirements are not actually extras then I would prefer
> having no special-cased extra names at all, or a special extra-like
> syntax used for pip-install'ing different categories of dependencies.

No, I still like the idea of using the existing extras syntax to
request their installation when you do want them, rather than needing
a special mechanism in the command line tools.

The declaration just got broken out to a separate field as otherwise
it wasn't clear whether test dependencies should be listed in
may_require, dev_requires or dev_may_require.

> Is there a function to get the metadata keys from the category name?
> It would be something like:
>
> f('test') -> 'test_requires', 'test_may_require'
>
> def f(category):
>
> if category == 'install': category = ''
> conditional = [category, 'may_require']
> unconditional = [category, '_requires']
> return ('_'.join(unconditional).strip('_'), '_'.join(conditional).strip('_'))

Possibly, but API details aren't a question for this PEP. If you look
at the deployment scenarios in the PEP, that's not actually the way
the mapping works anyway (development mode gets everything, not just
the dev dependencies).

Cheers,
Nick.

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


More information about the Distutils-SIG mailing list