Skip to content

Conversation

@mgorny
Copy link
Collaborator

@mgorny mgorny commented Apr 17, 2025

Rather than unpacking the wheel into a temporary directory and then repacking it, use zipfile to stream the contents of the original wheel to the new wheel, altering the METADATA in the process. This should be more efficient, especially when dealing with large wheels. It also removes the dependency on wheel package.

Ideally, we would copy other files without recompressing them at all, but unfortunately the zipfile module does not offer such a function right now (see python/cpython#125718).

Rather than unpacking the wheel into a temporary directory and then
repacking it, use zipfile to stream the contents of the original wheel
to the new wheel, altering the METADATA in the process.  This should
be more efficient, especially when dealing with large wheels.  It also
removes the dependency on `wheel` package.

Ideally, we would copy other files without recompressing them at all,
but unfortunately the zipfile module does not offer such a function
right now (see python/cpython#125718).
@mgorny mgorny requested a review from DEKHTIARJonathan April 17, 2025 13:47
Copy link
Member

@DEKHTIARJonathan DEKHTIARJonathan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the METADATA hash file in RECORD and then LGTM

@DEKHTIARJonathan DEKHTIARJonathan merged commit 4b14a23 into wheelnext:main Apr 17, 2025
8 checks passed
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

Successfully merging this pull request may close these issues.

2 participants