[Distutils] does pypi or red-dove have a better firehose API than "download all the packages"?

M.-A. Lemburg mal at egenix.com
Fri May 24 19:05:43 CEST 2013


On 24.05.2013 18:33, Donald Stufft wrote:
> 
> On May 24, 2013, at 12:31 PM, "M.-A. Lemburg" <mal at egenix.com> wrote:
> 
>> On 24.05.2013 18:18, Donald Stufft wrote:
>>>
>>> On May 24, 2013, at 12:14 PM, "M.-A. Lemburg" <mal at egenix.com> wrote:
>>>
>>>> On 24.05.2013 17:21, Vinay Sajip wrote:
>>>>> Donald Stufft <donald <at> stufft.io> writes:
>>>>>
>>>>>> Most packages also have an egg-info inside of them you can parse.
>>>>>
>>>>> I don't know how accurate that information is - IIRC pip always runs
>>>>> egg-info on downloaded archives. I presume this is to get the correct
>>>>> dependencies which are relevant to the installation system.
>>>>
>>>> It would be nice to have the PKG-INFO readily available on the /simple/
>>>> index pages.
>>>>
>>>> This contains the Requires header as well.
>>>
>>> The requires headers in the PKG-INFO are practically worthless.
>>
>> Hmm, looking at a few PKG-INFO entries for Zope packages, I guess you're
>> right. Looks like setuptools forgets to add the header to the PKG-INFO.
>>
>>>> At the moment, PKG-INFO is only available on the PyPI edit pages
>>>> for packages you own, even though access is possible without
>>>> login:
>>>>
>>>> https://pypi.python.org/pypi?name=egenix-mx-base&version=3.2.6&:action=display_pkginfo
>>
>> It does appear in our PKG-INFO entries:
>>
>> https://pypi.python.org/pypi?name=egenix-mxodbc&version=3.2.3&:action=display_pkginfo
>>
>> so I guess setuptools isn't behaving quite right in this respect.
> 
> setuptools is behaving correctly. the Requires field in the old metadata is for requiring python modules (e.g. things you can directly import). Whereas install_requires is for requiring python distributions (e.g. something you can download from PyPI). The old metadata has no provisions for python distributions.
> 
> That's why the Requires field is "practically worthless".

That's an unfortunate interpretation, since the original intention
was to describe package dependencies with those fields, but I can
see where this is coming from:

http://www.python.org/dev/peps/pep-0314/

It mentions the module import names, which often does not correspond
to the PyPI package name.

PEP 345 clarifies this (by using a new field), but unfortunately
never made its was into distutils.

Too bad.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, May 24 2013)
>>> Python Projects, Consulting and Support ...   http://www.egenix.com/
>>> mxODBC.Zope/Plone.Database.Adapter ...       http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
2013-07-01: EuroPython 2013, Florence, Italy ...           38 days to go

::::: Try our mxODBC.Connect Python Database Interface for free ! ::::::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/


More information about the Distutils-SIG mailing list