Skip to content

Commit c49ae41

Browse files
Prevent appending "universal" for unknown arch
Co-authored-by: Matthieu Darbois <[email protected]>
1 parent a785aff commit c49ae41

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packaging/tags.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ def _mac_binary_formats(version, cpu_arch):
410410
elif cpu_arch == "arm64":
411411
formats.append("universal2")
412412

413-
if cpu_arch != "arm64":
413+
if cpu_arch in {"x86_64", "i386", "ppc64", "ppc"}:
414414
formats.append("universal")
415415

416416
return formats

tests/test_tags.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,9 @@ def test_architectures(self, arch, is_32bit, expected):
247247
((10, 7), "ppc", []),
248248
((10, 6), "ppc", ["ppc", "fat32", "fat", "universal"]),
249249
((10, 0), "ppc", ["ppc", "fat32", "fat", "universal"]),
250-
((11, 0), "riscv", ["riscv", "universal"]),
250+
((11, 0), "riscv", ["riscv"]),
251+
((11, 0), "x86_64", ["x86_64", "intel", "fat64", "fat32", "universal2", "universal"]),
252+
((11, 0), "arm64", ["arm64", "universal2"]),
251253
],
252254
)
253255
def test_binary_formats(self, version, arch, expected):

0 commit comments

Comments
 (0)