On 31 March 2015 at 12:16, Erik Bray <[email protected]> wrote:
> On Mon, Mar 30, 2015 at 7:07 PM, Robert Collins
> <[email protected]> wrote:
>> On 31 March 2015 at 12:03, Erik Bray <[email protected]> wrote:
>>
>>> I haven't followed this whole discussion (I started to in the
>>> beginning, but haven't kept up), but I'm not really sure what's being
>>> said here.  d2to1 *does* support declaring setup-requires dependencies
>>> in setup.cfg, and those dependencies should be loaded before any hook
>>> scripts are used.  Everything in d2to1 is done via various hook
>>> points, and the hook functions can be either shipped with the package,
>>> or come from external requirements installed via setup-requires.  It
>>> works pretty well in most cases.
>>
>> Oh, it does!? I was looking through the source and couldn't figure it
>> out. What key is looked for for setup-requires? Also does it define a
>> schema for extra-requires?
>
> Yeah, sorry about that.  That's one of those things that was never
> actually supported in distutils2 by the time it went poof, and that I
> added later.
>
> You can use:
>
> [metadata]
> setup-requires-dist = foo
>
> So say, for example you have some package called "versionutils" that's
> used to generate the package's version number (by reading it from
> another file, tacking on VCS info, etc.)  You can use:
>
> [metadata]
> setup-requires-dist = versionutils
>
> [global]
> setup-hooks = versionutils.version_hook
>
> or something to that effect.  It will ensure versionutils is
> importable (this uses easy_install just like the normal setup_requires
> feature in setuptools; I would like to change this one day to instead
> use something like Daniel's setup-requires [1] trick).
> It will then, fairly early in the setup process, hand the package
> metadata over to versionutils.version_hook, and let it insert a
> version string.
>
> Erik
>
> [1] https://bitbucket.org/dholth/setup-requires

I'll add setup-requires-dist as an alias for setup-requires in the
declarative work I'm doing.

Did distutils2 support declarative extras?


-- 
Robert Collins <[email protected]>
Distinguished Technologist
HP Converged Cloud
_______________________________________________
Distutils-SIG maillist  -  [email protected]
https://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to