Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions wheelfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1398,6 +1398,12 @@ def from_wheelfile(
compresslevel=compresslevel,
strict_timestamps=strict_timestamps,
)
# if we copy a wheel from an existing wheelfile, we should recreate the
# distinfo_prefix with the original distname and the modified version
# if we do not set _distinfo_prefix, the distname will get canonicalized through
# _distinfo_path(), and this is wrong when building a wheel from an existing one
# as it will break package discovery
new_wf._distinfo_prefix = f"{distname}-{version}."

assert new_wf.wheeldata is not None # For MyPy

Expand Down