On Jun 20, 2013, at 5:40 PM, Paul Moore <p.f.moore@gmail.com> wrote:

On 20 June 2013 21:54, Daniel Holth <dholth@gmail.com> wrote:
These metadata PEPs are
mostly about the installer, database of installed files, and package
indexes.

In essence (and I freely admit I don't fully understand the details yet myself) I think the idea is that PEPs 426 and 440 define a set of data that can be published by packages. The *how* of publishing that data is still to be defined - the idea is that there will be the appropriate metadata JSON files available, but no tools currently produce that format. Equally, installers like pip will be able to read the metadata and ensure that dependencies are installed appropriately (for example) but again, that will be a future change to pip.

For now, the PEPs define a standard for tools to *use*, but leave the creation of such tools (or modification of existing tools) as a later step.

I don't think the PEPs say anything about a plan for implementing the spec (although I haven't read the PEPs in detail yet, so I may have missed something) but my assumption is that it'll go something like this:

1. Python setup.py sdist and python setup.py dist_info will be changed to generate pymeta.json files. But that will be for Python 3.4 only (there's a big problem if this doesn't make it into 3.4...). Unless there's a distutils backport or similar.

sdist 2.0 is not part of the PEP afaik. There will be a separate PEP for that. Wheel's will be the only thing generating these files to begin with.

2. Pypi will be changed to publish metadata from pymeta.json, when it is present, which tools like pip can consume (see later).
3. Wheel will put pymeta.json into wheels, from the pymeta.json created by (1) and likely by converting legacy egg-info metadata as a fallback. Wheel will also write pymeta.json on install.
4. Pip will use PE 426 metadata from PyPI, write pymeta.json on install, and use installed pymeta.json (again probably falling back to legacy formats where pymeta.json isn't present).
5. Distlib will follow suit.

The big gap here is older versions of Python. Maybe a setuptools plugin to generate the new metadata in sdists would be viable. Maybe package writers could provide pymeta.json by hand, although I seriously doubt many will bother.

How close am I to reality here?

Paul
_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig

Basically the plan with PEP426 is to come up with the "installer" side of things. There's places that things like building (going from sdist to wheel) or development (going from checkout to sdist) can be incorporated. And some thoughts have been made for it but afaik the primary focus has been on making this possible with wheels while leaving us a path to doing the same with sdists.

-----------------
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA