Skip to content

Commit

Permalink
Merge pull request #421 from justvanrossum/fix-universal
Browse files Browse the repository at this point in the history
Fix universal
  • Loading branch information
justvanrossum authored Jul 13, 2024
2 parents 196d141 + 53015f4 commit 34ddba4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions App/Distribute/ensure_universal_wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,17 @@ def main():
platform_wheels.append(file_descriptor["url"])

if universal_wheels:
assert len(universal_wheels) == 1
assert len(universal_wheels) == 1, universal_wheels
download_file(universal_wheels[0], wheels_dir)
elif platform_wheels:
assert len(platform_wheels) == 2
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:
raise IncompatibleWheelError(
Expand Down

0 comments on commit 34ddba4

Please sign in to comment.