From 635c64eeb71b03c4f5d31228a111f043b75771f8 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Sun, 14 May 2023 20:51:17 +0100 Subject: [PATCH] make it possible to run linux tests on arm64 macs --- test/utils.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test/utils.py b/test/utils.py index cd947789..0e2b7a7f 100644 --- a/test/utils.py +++ b/test/utils.py @@ -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