[Distutils] distlib and wheel metadata
Jim Fulton
jim at jimfulton.info
Tue Feb 14 13:36:47 EST 2017
On Tue, Feb 14, 2017 at 1:10 PM, Vinay Sajip <vinay_sajip at yahoo.co.uk>
wrote:
> > humpty in term uses uses distlib which seems to mishandle wheel
> > metadata. (For example, it chokes if there's extra distribution meta and
> > makes it impossible for buildout to install python-dateutil from a
> wheel.)
>
> I looked into the "mishandling". It's that the other tools don't adhere to
> [the current state of] PEP 426 as closely as distlib does. For example,
> wheel writes JSON metadata to metadata.json in the .dist-info directory,
> whereas PEP 426 calls for that data to be in pydist.json. The non-JSON
> metadata in the wheel (the METADATA file) does not strictly adhere to any
> of the metadata PEPs 241, 314, 345 or 426 (it has a mixture of incompatible
> fields).
>
> I can change distlib to look for metadata.json, and relax the rules to be
> more liberal regarding which fields to accept, but adhering to the PEP
> isn't mishandling things, as I see it.
>
Fair enough. Notice that I said "seems to". :-]
I suppose whether to be strict or not depends on use case. In my case, I
was just trying to install a wheel as an egg, so permissive is definately
what *I* want. Other use cases might want to be more strict.
>
> Work on distlib has slowed right down since around the time when PEP 426
> was deferred indefinitely, and there seems to be little interest in
> progressing via metadata or other standardisation - we have to go by what
> the de facto tools (setuptools, wheel) choose to do. It's not an ideal
> situation, and incompatibilities can crop up, as you've seen.
>
Nope. Honestly, though, I wish there was *one* *library* that defined the
standard, which was the case for setuptools for a while (yeah, I know, the
warts, really, I know) because I really don't think there's a desire to
innovate or a reason for competition at this level. In the case of wheel,
perhaps it makes sense for that implementation to be authoritative.
Thanks.
Jim
--
Jim Fulton
http://jimfulton.info
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20170214/c1ba0fe5/attachment.html>
More information about the Distutils-SIG
mailing list