[Distutils] PEP 426 (Metadata 2.0) - Requires-Dist and setuptools/distribute

PJ Eby pje at telecommunity.com
Tue Mar 5 15:59:12 CET 2013


On Mon, Mar 4, 2013 at 3:20 PM, Paul Moore <p.f.moore at gmail.com> wrote:
> On 4 March 2013 20:00, Daniel Holth <dholth at gmail.com> wrote:
>> On Mon, Mar 4, 2013 at 2:41 PM, Paul Moore <p.f.moore at gmail.com> wrote:
>>> In thinking about how virtualenv would describe the packages it wants
>>> to preload in PEP 426 metadata form, it occurred to me that there are
>>> scenarios with setuptools and distribute where it's not obvious how to
>>> state the requirement you want. Specifically, if you want to install
>>> setuptools if it is present, but if not fall back to distribute (for
>>> example, if you have a local package repository and no access to PyPI,
>>> but setuptools may or may not be present).
> [...]
>>
>> We do have Provides-Dist, although the best way to implement it is an
>> open question.
>
> Good point. So distribute would have "Provides-Dist: setuptools" and I
> could just require setuptools. Given that none of this is supported
> yet, I'm happy that the spec covers this case, but still need to work
> around it for the immediate future.

Provides-Dist doesn't actually work for most of the use cases for
alternates, though.  For example, if a package that wants to require
one of the various mysql adapters, it doesn't make any sense for the
mysql packages to declare that they provide each other.  ;-)


More information about the Distutils-SIG mailing list