make it possible to run linux tests on arm64 macs

This commit is contained in:
Joe Rickerby
2023-05-14 20:51:17 +01:00
parent f29da13c2c
commit 635c64eeb7
+12 -1
View File
@@ -192,7 +192,7 @@ def expected_wheels(
platform_tags = []
if platform == "linux":
architectures = [machine_arch]
architectures = [arch_name_for_linux(machine_arch)]
if machine_arch == "x86_64":
architectures.append("i686")
@@ -255,3 +255,14 @@ def get_macos_version():
"""
version_str, _, _ = pm.mac_ver()
return tuple(map(int, version_str.split(".")[:2]))
def arch_name_for_linux(arch: str):
"""
Archs have different names on different platforms, but it's useful to be
able to run linux tests on dev machines. This function translates between
the different names.
"""
if arch == "arm64":
return "aarch64"
return arch