Skip to content

Commit

Permalink
fix: add tag for macOS x86_64 (#83)
Browse files Browse the repository at this point in the history
fix #81
  • Loading branch information
mayeut authored Oct 4, 2021
1 parent f83a5dd commit 70e37a4
Showing 1 changed file with 4 additions and 3 deletions.
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

0 comments on commit 70e37a4

Please sign in to comment.