Skip to content
Merged
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
7 changes: 4 additions & 3 deletions scripts/repair_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,17 @@ def main():
assert len(files) == 1, files
file = files[0]

# we need to handle macOS universal2 & arm64 here for now, let's use additional_platforms for this.
# we need to handle macOS x86_64 & arm64 here for now, let's use additional_platforms for this.
additional_platforms = []
if os_ == "macos":
# first, get the target macOS deployment target from the wheel
match = re.match(r"^.*-macosx_(\d+)_(\d+)_.*\.whl$", file.name)
assert match is not None, f"Couldn't match on {file.name}"
target = tuple(map(int, match.groups()))

# let's add universal2 platform for this wheel.
additional_platforms = ["macosx_{}_{}_universal2".format(*target)]
# given pip support for universal2 was added after x86_64 introduction
# let's also add x86_64 platform.
additional_platforms.append("macosx_{}_{}_x86_64".format(*target))

# given pip support for universal2 was added after arm64 introduction
# let's also add arm64 platform.
Expand Down