Skip to content

Commit a7a1d1c

Browse files
authored
chore: pull set construction out of function (#1012)
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 5de9865 commit a7a1d1c

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

src/packaging/_manylinux.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@
1515
EF_ARM_ABI_VER5 = 0x05000000
1616
EF_ARM_ABI_FLOAT_HARD = 0x00000400
1717

18+
_ALLOWED_ARCHS = {
19+
"x86_64",
20+
"aarch64",
21+
"ppc64",
22+
"ppc64le",
23+
"s390x",
24+
"loongarch64",
25+
"riscv64",
26+
}
27+
1828

1929
# `os.PathLike` not a generic type until Python 3.9, so sticking with `str`
2030
# as the type for `path` until then.
@@ -57,16 +67,7 @@ def _have_compatible_abi(executable: str, archs: Sequence[str]) -> bool:
5767
return _is_linux_armhf(executable)
5868
if "i686" in archs:
5969
return _is_linux_i686(executable)
60-
allowed_archs = {
61-
"x86_64",
62-
"aarch64",
63-
"ppc64",
64-
"ppc64le",
65-
"s390x",
66-
"loongarch64",
67-
"riscv64",
68-
}
69-
return any(arch in allowed_archs for arch in archs)
70+
return any(arch in _ALLOWED_ARCHS for arch in archs)
7071

7172

7273
# If glibc ever changes its major version, we need to know what the last

0 commit comments

Comments
 (0)