[Distutils] install_requires vs. requires_dist, and setup.cfg

Nick Coghlan ncoghlan at gmail.com
Tue Apr 8 05:32:22 CEST 2014


On 7 Apr 2014 00:59, "Marcus Smith" <qwcode at gmail.com> wrote:
>
>
>> From what I understand in PEP 345, "Requires-Dist" is the name in
PKG-INFO files for a distribution's dependencies on other distributions.
>
>
> setuptools/distutils has never implemented "Requires-Dist" from PEP345
for PKG-INFO.
> Otoh, wheel has, combined with PEP376, so you'll see it in *.dist-info
METADATA files, when installing from wheels.
>
>>  install_requires is the name of the keyword argument to setup() that
specifies a dependency on another distribution.
>
>
> yes
>
>>
>> Sanity-check: This doesn't mean that one should call setup() with a
"required_dist" keyword argument, right?
>
>
> right
>
>> As I understand it. the setup.cfg revolution never happened,
>
>
> right, see http://packaging.python.org/en/latest/future.html
>
>
>>
>> Also, I just created a trivial setup.py that contains an
"install_requires" and doing "python setup.py develop --user" does seem to
have created a PKG-INFO file, but it doesn't have a "Requires-Dist" line.
>
>
> look for the "requires.txt" file.  the dependency is in there.

And for some additional context: the currently active metadata standards
really consist of metadata 1.1 + the setuptools defined metadata files for
dependencies and entry points. The 1.x metadata PEPs really don't stand on
their own (not even 1.2).

We know this is confusing, but it has been working well enough to bump
metadata 2.0 down the priority list for the past several months. With any
luck, we'll be able to thrash out the remaining issues here at PyCon and
start to give people a clearer alternative (once the PEPs have been
accepted and setuptools/pip/etc updated accordingly).

Cheers,
Nick.

>
>
>
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> https://mail.python.org/mailman/listinfo/distutils-sig
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20140408/64f159bd/attachment-0001.html>


More information about the Distutils-SIG mailing list