[Distutils] install_requires vs requires

David Cournapeau cournape at gmail.com
Wed Dec 16 08:19:50 CET 2009


On Tue, Dec 15, 2009 at 2:40 PM, Tarek Ziadé <ziade.tarek at gmail.com> wrote:
> On Tue, Dec 15, 2009 at 8:28 AM, David Cournapeau <cournape at gmail.com> wrote:
>> Hi,
>>
>> I am working on a new packaging solution, and I want to convert
>> existing setup.py. I noticed that the install_requires as used by
>> setuptools is not put into PKG-INFO as requires. Is this expected ?
>
> Yes because it is not part of the standard, so setuptools is putting
> this in "requires.txt"
> which could be considered as an extension to the metadata.

Ok, that makes sense.

>
> PEP 345 will include a new field that can replace requires.txt.
>
>> What is the difference between requires and require_install ? What
>> happens when both have different values ?
>
> What are those names ?

I mostly use the distutils sources as reference, and the
DistributionMetadata class generates provides metadata as documented
in the corresponding PEP if the requires attribute is not empty.

Does it make sense to generate PKG-INFO with the requires field which
value would be taken from the install_requires ? I am using sphinx as
my main test for the conversion now, and I noticed that setuptools
does not generate a PKG-INFO with those data (v1.0 instead of v1.1 as
I would have expected).

> See http://packages.python.org/distribute/setuptools.html#new-and-changed-setup-keywords
> for the list of new keywords introduced by Setuptools (+ a few more by
> Distribute)

Will those arguments be added to distutils as well ? Or should I
consider those arguments only when I detect
distribute/setuptools-based setup.py ?

cheers,

David


More information about the Distutils-SIG mailing list