[Python-Dev] Fwd: PEP 426 is now the draft spec for distribution metadata 2.0 (original) (raw)
Donald Stufft donald.stufft at gmail.com
Tue Feb 19 21:36:21 CET 2013
- Previous message: [Python-Dev] Fwd: PEP 426 is now the draft spec for distribution metadata 2.0
- Next message: [Python-Dev] Fwd: PEP 426 is now the draft spec for distribution metadata 2.0
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tuesday, February 19, 2013 at 3:25 PM, Paul Moore wrote:
On 19 February 2013 13:40, Nick Coghlan <ncoghlan at gmail.com (mailto:ncoghlan at gmail.com)> wrote: > > If a tools wants to support metadata 2.0, it has to support all > > the complicated stuff as well, i.e. handle the requires fields, > > the environment markers and version comparisons/sorting. > > > > > Which is what distutils2 can be used for now, and what distlib will > provide without the unwanted build system infrastructure in > distutils2. >
One particular item in Metadata 2.0 which needs to be addressed is requirements specifiers, as used in (for example) Requires-Dist. These take forms like "DistName (>= ver)". There are a number of potential issues here: 1. This differs from the pkgresources format (which omits the parentheses). Having 2 subtly different formats is not a good idea in the long term. At the moment, pkgresources format is used in pip requirements (on the command line and in requirement files) as well as in setuptools/distribute and possibly elsewhere. 2. There is currently no code that I am aware of that implements this spec. I don't believe distlib does (yet - give Vinay 5 minutes and who knows? :-)), pkgresources as I said implements a different format, and distutils2, apart from being a big dependency to cover just this point, only matches the version (not the project name) and presumably does so using the distutils2 version ordering (which is incompatible with Metadata 2.0).
It should be alongside the version stuff, atleast it was in distutils2. 3. The format is fiddly to parse and process - nobody is likely to implement it for themselves without a library that does it (especially not when using pkgresources is so easy).
The PEP needs a rationale as to why the pkgresources format wasn't used, and should suggest a migration path for projects which currently use the pkgresources style (such as pip's requirements files). Paul
Python-Dev mailing list Python-Dev at python.org (mailto:Python-Dev at python.org) http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/donald.stufft%40gmail.com
-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20130219/9093b066/attachment.html>
- Previous message: [Python-Dev] Fwd: PEP 426 is now the draft spec for distribution metadata 2.0
- Next message: [Python-Dev] Fwd: PEP 426 is now the draft spec for distribution metadata 2.0
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]