Skip to content

Commit

Permalink
Allow RECORD in subfolders, such as what is provided in 'py', which c… (
Browse files Browse the repository at this point in the history
  • Loading branch information
mboisson authored Jul 18, 2024
1 parent c1a9494 commit cc89b4a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wheelfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,8 @@ def update(self, arcpath: str, buf: IO[bytes]):
assert buf.tell() == 0, (
f"Stale buffer given - current position: {buf.tell()}."
)
assert not arcpath.endswith('.dist-info/RECORD'), (
# if .dist-info/RECORD is not in a subdirectory, it is not allowed
assert "/" in arcpath.replace('.dist-info/RECORD',"") or not arcpath.endswith('.dist-info/RECORD'), (
f"Attempt to add an entry for a RECORD file to the RECORD: "
f"{repr(arcpath)}."
)
Expand Down

0 comments on commit cc89b4a

Please sign in to comment.