Skip to content

Commit 635c64e

Browse files
committed
make it possible to run linux tests on arm64 macs
1 parent f29da13 commit 635c64e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

test/utils.py

+12-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def expected_wheels(
192192
platform_tags = []
193193

194194
if platform == "linux":
195-
architectures = [machine_arch]
195+
architectures = [arch_name_for_linux(machine_arch)]
196196

197197
if machine_arch == "x86_64":
198198
architectures.append("i686")
@@ -255,3 +255,14 @@ def get_macos_version():
255255
"""
256256
version_str, _, _ = pm.mac_ver()
257257
return tuple(map(int, version_str.split(".")[:2]))
258+
259+
260+
def arch_name_for_linux(arch: str):
261+
"""
262+
Archs have different names on different platforms, but it's useful to be
263+
able to run linux tests on dev machines. This function translates between
264+
the different names.
265+
"""
266+
if arch == "arm64":
267+
return "aarch64"
268+
return arch

0 commit comments

Comments
 (0)