Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove metadata.json from the generated files in .dist-info #195

Closed
agronholm opened this issue Oct 7, 2017 · 6 comments
Closed

Remove metadata.json from the generated files in .dist-info #195

agronholm opened this issue Oct 7, 2017 · 6 comments
Milestone

Comments

@agronholm
Copy link
Contributor

As PEP 426 was never accepted, I don't feel like we should generate this file anymore in the .dist-info directory in the wheel file.

@agronholm agronholm added this to the 1.0.0 milestone Oct 7, 2017
@agronholm
Copy link
Contributor Author

This should also resolve #75.

@tuukkamustonen
Copy link

PEP 426 is actually deferred, not rejected, so it doesn't hurt to have metadata.json there.

However, chances are that the format will actually change before (and if) it gets approved, so in that regard removing metadata.json would be ok, I guess.

@agronholm agronholm modified the milestones: 1.0.0, 0.31 Mar 22, 2018
@wimglenn
Copy link
Contributor

wimglenn commented Apr 3, 2018

Whoops, I was using this dist-info json for various automation stuff and it all broke after wheel 0.31 release. What's the machine-readable replacement now? Do we have to parse that METADATA?

@di
Copy link
Sponsor Member

di commented Apr 3, 2018

@wimglenn You can either use the pkginfo project or just do what it does and parse METADATA directly:

>>> from email.parser import Parser
>>> meta = Parser().parse(open('METADATA'))
>>> meta.items()
# List of key/value tuples
>>> meta.get_payload()
# Description contents

@wimglenn
Copy link
Contributor

wimglenn commented Apr 3, 2018

@di will give it a shot, thanks!

@cyrilleverrier
Copy link

cyrilleverrier commented Jun 20, 2018

For reference, Jfrog Artifactory relies on metadata.json file to read the meta data.
A ticket has been opened: https://www.jfrog.com/jira/browse/RTFACT-16360 (marked as dup of internal bug)
The issue has not been fixed yet by Artifactory.

Workaround: downgrade wheel to 0.30.0

benjyw added a commit to benjyw/pants that referenced this issue Oct 14, 2018
The latest version of wheel (0.32.1, just released) no longer writes
the metadata.json file (see pypa/wheel#195).
Instead, we must now read the version from the METADATA file.

This change also tightens up the release docs a bit.
benjyw added a commit to pantsbuild/pants that referenced this issue Oct 14, 2018
The latest version of wheel (0.32.1, just released) no longer writes
the metadata.json file (see pypa/wheel#195).
Instead, we must now read the version from the METADATA file.

This change also tightens up the release docs a bit.
mbakke pushed a commit to guix-mirror/guix that referenced this issue Jul 2, 2019
With newer Wheel releases, there is no more metadata.json file; the METADATA
file should be used instead (see: pypa/wheel#195).

This change updates our PyPI importer so that it uses the latter.

* guix/import/pypi.scm (define-module): Remove unnecessary modules and export
the PARSE-WHEEL-METADATA procedure.
(parse-wheel-metadata): Add procedure.
(guess-requirements): Use it.
* tests/pypi.scm (test-metadata): Test it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants