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

PJ Eby pje at telecommunity.com
Thu Feb 21 00:36:21 CET 2013


On Wed, Feb 20, 2013 at 5:30 AM, M.-A. Lemburg <mal at egenix.com> wrote:
> The wording in the PEP alienates the egg format by defining
> an incompatible new standard for the location of the metadata
> file:

This isn't a problem, because there's not really a use case at the
moment for eggs to include a PEP 426-format metadata file, and if they
ever do, it ought to be called METADATA, so that pkg_resources will
know to read it if there are no egg-format dependencies listed.
Setuptools also doesn't care what format PKG-INFO is in, as it only
ever reads the "Version:" field, and that only in the case of
in-development source packages.

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

As soon as distutils does it, setuptools will do it, because
setuptools delegates metadata writing to distutils.  So there's no
"alienation" here.

What will need to happen at some point is for pkg_resources to
implement support for PEP 426-style version requirements, which I
haven't tried to fully wrap my head around as yet.  I'm hoping that
there are simple textual substitutions (e.g. regexes) that can be done
to convert them to pkg_resources requirements.  If need be, I'll swipe
whatever's needed from distlib.  ;-)

In the meantime, eggs aren't actually going anywhere, since wheels
aren't actually trying to replace all of their use cases.  And since
the new metadata and binary formats don't actually add much new
functionality over what eggs already do, eggs wouldn't lose much by
not being able to use the same metadata, anyway.  ;-)


More information about the Python-Dev mailing list