File tree Expand file tree Collapse file tree
Open diff view settings
Expand file tree Collapse file tree
Open diff view settings
Original file line number Diff line number Diff 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 ,
You can’t perform that action at this time.
0 commit comments