Skip to content

Commit 2e6fff6

Browse files
committed
Update manylinux check
1 parent 1a07a1f commit 2e6fff6

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

docker/build_scripts/manylinux-check.py

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,33 @@
1-
# Logic copied from PEP 513
1+
# Logic copied from PEP 599
22

33
import sys
44

55

6-
def is_manylinux2010_compatible():
7-
# Only Linux, and only x86-64 / i686
6+
def is_manylinux2014_compatible():
7+
# Only Linux, and only supported architectures
88
from distutils.util import get_platform
9-
if get_platform() not in ["linux-x86_64", "linux-i686"]:
9+
if get_platform() not in [
10+
"linux-x86_64",
11+
"linux-i686",
12+
"linux-aarch64",
13+
"linux-armv7l",
14+
"linux-ppc64",
15+
"linux-ppc64le",
16+
"linux-s390x",
17+
]:
1018
return False
1119

1220
# Check for presence of _manylinux module
1321
try:
1422
import _manylinux
15-
return bool(_manylinux.manylinux1_compatible)
23+
return bool(_manylinux.manylinux2014_compatible)
1624
except (ImportError, AttributeError):
1725
# Fall through to heuristic check below
1826
pass
1927

20-
# Check glibc version. CentOS 6 uses glibc 2.12.
21-
return have_compatible_glibc(2, 12)
28+
# Check glibc version. CentOS 7 uses glibc 2.17.
29+
# PEP 513 contains an implementation of this function.
30+
return have_compatible_glibc(2, 17)
2231

2332

2433
def have_compatible_glibc(major, minimum_minor):
@@ -49,9 +58,9 @@ def have_compatible_glibc(major, minimum_minor):
4958
return True
5059

5160

52-
if is_manylinux2010_compatible():
53-
print("%s is manylinux2010 compatible" % (sys.executable,))
61+
if is_manylinux2014_compatible():
62+
print("%s is manylinux2014 compatible" % (sys.executable,))
5463
sys.exit(0)
5564
else:
56-
print("%s is NOT manylinux2010 compatible" % (sys.executable,))
65+
print("%s is NOT manylinux2014 compatible" % (sys.executable,))
5766
sys.exit(1)

0 commit comments

Comments
 (0)