Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ae33263

Browse filesBrowse files
msimacekilyass-elmazidi
authored andcommitted
Avoid using platform.processor() in repair_wheels
(cherry picked from commit d13e563)
1 parent a70cb21 commit ae33263
Copy full SHA for ae33263

1 file changed

+16-2Lines changed: 16 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎scripts/wheelbuilder/repair_wheels.py‎

Copy file name to clipboardExpand all lines: scripts/wheelbuilder/repair_wheels.py
+16-2Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,19 @@ def repair_wheels(wheelhouse):
8181
)
8282
elif sys.platform == "linux":
8383
ensure_installed("auditwheel", "patchelf")
84+
arch = platform.machine().lower()
85+
if arch == "x86_64":
86+
plat_arg = "manylinux_2_28_x86_64"
87+
elif arch == "aarch64":
88+
plat_arg = "manylinux_2_28_aarch64"
89+
else:
90+
raise RuntimeError(f"Unsupported architecture on Linux: {arch}")
8491
p = subprocess.run(
8592
[
8693
join(dirname(sys.executable), "auditwheel"),
8794
"repair",
8895
"--plat",
89-
"manylinux_2_28_x86_64" if platform.processor() == "x86_64" else "manylinux_2_28_aarch64",
96+
plat_arg,
9097
"-w",
9198
wheelhouse,
9299
whl,
@@ -95,13 +102,20 @@ def repair_wheels(wheelhouse):
95102
)
96103
elif sys.platform == "darwin":
97104
ensure_installed("delocate")
105+
arch = platform.machine().lower()
106+
if arch == "arm64":
107+
require_arch = "arm64"
108+
elif arch == "x86_64":
109+
require_arch = "x86_64"
110+
else:
111+
raise RuntimeError(f"Unsupported architecture on macOS: {arch}")
98112
p = subprocess.run(
99113
[
100114
join(dirname(sys.executable), "delocate-wheel"),
101115
"-v",
102116
"--ignore-missing-dependencies",
103117
"--require-archs",
104-
"arm64" if platform.processor() == "arm" else "x86_64",
118+
require_arch,
105119
"-w",
106120
wheelhouse,
107121
whl,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.