Skip to content

Commit

Permalink
Try to prune the platform wheel list down to two items
Browse files Browse the repository at this point in the history
  • Loading branch information
justvanrossum committed Jul 13, 2024
1 parent 3a5188f commit 53015f4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions App/Distribute/ensure_universal_wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ def main():
assert len(universal_wheels) == 1, universal_wheels
download_file(universal_wheels[0], wheels_dir)
elif platform_wheels:
if len(platform_wheels) > 2:
# There may be multiple wheels per platform. Pick the first of each from
# a sorted list.
platform_wheels = sorted(platform_wheels)
x86_64 = [pw for pw in platform_wheels if "x86_64" in pw.rsplit("/", 1)[-1]]
arm64 = [pw for pw in platform_wheels if "arm64" in pw.rsplit("/", 1)[-1]]
platform_wheels = [x86_64[0], arm64[1]]
assert len(platform_wheels) == 2, platform_wheels
merge_wheels(platform_wheels[0], platform_wheels[1], wheels_dir)
else:
Expand Down

0 comments on commit 53015f4

Please sign in to comment.