[Python-Dev] Fwd: PEP 426 is now the draft spec for distribution metadata 2.0

M.-A. Lemburg mal at egenix.com
Wed Feb 20 11:30:28 CET 2013

On 20.02.2013 00:16, Daniel Holth wrote:
> On Tue, Feb 19, 2013 at 5:10 PM, M.-A. Lemburg <mal at egenix.com> wrote:
>> On 19.02.2013 23:01, Daniel Holth wrote:
>>> On Tue, Feb 19, 2013 at 4:34 PM, M.-A. Lemburg <mal at egenix.com> wrote:
>>>> On 19.02.2013 14:40, Nick Coghlan wrote:
>>>>> On Tue, Feb 19, 2013 at 11:23 PM, M.-A. Lemburg <mal at egenix.com>
>> wrote:
>>>>>> * PEP 426 doesn't include any mention of the egg distribution format,
>>>>>>   even though it's the most popular distribution format at the moment.
>>>>>>   It should at least include the location of the metadata file
>>>>>>   in eggs (EGG-INFO/PKG-INFO) and egg installations
>>>>>>   (<eggdir>/EGG-INFO/PKG-INFO).
>>>>> "Other tools involved in Python distribution may also use this format."
>>>>> The egg format has never been, and never will be, officially endorsed
>>>>> by python-dev. The wheel format is the standard format for binary
>>>>> distribution, and PEP 376 defines the standard location for metadata
>>>>> on installed distributions.
>>>> Oh, come on, Nick, that's just silly. setuptools was included in stdlib
>>>> for a short while, so the above is simply wrong. Eggs are the most
>>>> widely used binary distribution format for Python package on PyPI:
>>>> # wc *files.csv
>>>>   25585   25598 1431013 2013-02-19-egg-files.csv
>>>>    4619    4640  236694 2013-02-19-exe-files.csv
>>>>     254     255   13402 2013-02-19-msi-files.csv
>>>>  104691  104853 5251962 2013-02-19-tar-gz-files.csv
>>>>      24      24    1221 2013-02-19-whl-files.csv
>>>>   17937   18022  905913 2013-02-19-zip-files.csv
>>>>  153110  153392 7840205 total
>>>> (based on todays PyPI stats)
>>>> It doesn't really help ignoring realities... and I'm saying
>>>> that as one of the core devs who got setuptools kicked out of
>>>> the stdlib again.
>>>> --
>>>> Marc-Andre Lemburg
>>>> eGenix.com
>>> The wheel philosophy is that it should be supported by both python-dev
>> and
>>> setuptools and that you should feel happy about using setuptools if you
>>> like it whether or not python-dev (currently) endorses that. If you are
>>> using setuptools (distribute's pkg_resources) then you can use both at
>> the
>>> same time.
>>> Distribute, distutils and setuptools' problems have not been well
>>> understood which I think is why there has been a need to discredit
>>> setuptools by calling it non-standard. It is the defacto standard. If
>> your
>>> packages have dependencies there is no other choice. Wheel tries to solve
>>> the real problem by allowing you to build a package with setuptools while
>>> giving the end-user the choice of installing setuptools or not.
>>> Of course eggs are the most popular right now. The wheel format is very
>>> egg-like while avoiding some of egg's problems. See the comparison in the
>>> PEP or read the story on wheel's rtfd. The wheel project includes tools
>> to
>>> losslessly convert eggs or bdist_wininst to wheel.
>> That's all fine, but it doesn't explain the refusal to add the
>> documentation of the location of the PKG-INFO file in eggs ?
> It would just be a sentence, I wouldn't have a problem with it but I also
> don't see why it would be necessary. Even setuptools doesn't touch the file
> usually. Right now distribute's pkg_resources currently only understands
> Requires-Dist if it is inside a .dist-info directory.

Perhaps I'm not clear enough. I'll try again :-)

The wording in the PEP alienates the egg format by defining
an incompatible new standard for the location of the metadata

There are three standard locations for these metadata files:

* the PKG-INFO file included in the base directory of Python source distribution archives (as
created by the distutils sdist command)
* the {distribution}-{version}.dist-info/METADATA file in a wheel binary distribution archive (as
described in PEP 425, or a later version of that specification)
* the {distribution}-{version}.dist-info/METADATA files in a local Python installation database (as
described in PEP 376, or a later version of that specification)

It's easy to upgrade distribute and distutils to write
metadata 1.2 format, simply by changing the version in the
PKG-INFO files.

These addition are necessary to fix the above and also include
the standard location of the metadata for pip and distutils installations:

* the EGG-INFO/PKG-INFO file in an egg binary distribution archive (as created by the distribute
bdist_egg command)

* the {distribution}-{version}.egg/EGG-INFO/PKG-INFO file in an installed egg distribution archive

* the {distribution}-{version}.egg-info/PKG-INFO file for packages installed with "pip install" or
distribute's "python setup.py install"

* the {distribution}-{version}.egg-info file for packages installed with distutils' "python setup.py

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Feb 20 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/

::::: 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

More information about the Python-Dev mailing list