21
21
#if !__GLIBC_PREREQ(2, 5) /* manylinux1 is glibc 2.5 */
22
22
#error "Must run on a glibc >= 2.5 linux environment"
23
23
#endif
24
+
25
+ #if __GLIBC_PREREQ(2, 28)
26
+ #include <threads.h>
27
+ #endif
24
28
"""
25
29
),
26
30
spam_c_function_add = textwrap .dedent (
27
31
r"""
28
- #if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 24)
32
+ #if __GLIBC_PREREQ(2, 28)
33
+ // thrd_equal & thrd_current are only available in manylinux_2_28+
34
+ sts = thrd_equal(thrd_current(), thrd_current()) ? 0 : 1;;
35
+ #elif __GLIBC_PREREQ(2, 24)
29
36
// nextupf is only available in manylinux_2_24+
30
37
sts = (int)nextupf(0.0F);
31
- #elif defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 17) /* manylinux2014 is glibc 2.17 */
38
+ #elif __GLIBC_PREREQ(2, 17) /* manylinux2014 is glibc 2.17 */
32
39
// secure_getenv is only available in manylinux2014+
33
40
sts = (int)(intptr_t)secure_getenv("NON_EXISTING_ENV_VARIABLE");
34
- #elif defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) /* manylinux2010 is glibc 2.12 */
41
+ #elif __GLIBC_PREREQ(2, 10) /* manylinux2010 is glibc 2.12 */
35
42
// malloc_info is only available on manylinux2010+
36
43
sts = malloc_info(0, stdout);
37
44
#endif
41
48
42
49
43
50
@pytest .mark .parametrize (
44
- "manylinux_image" , ["manylinux1" , "manylinux2010" , "manylinux2014" , "manylinux_2_24" ]
51
+ "manylinux_image" ,
52
+ ["manylinux1" , "manylinux2010" , "manylinux2014" , "manylinux_2_24" , "manylinux_2_28" ],
45
53
)
46
54
def test (manylinux_image , tmp_path ):
47
55
if utils .platform != "linux" :
48
56
pytest .skip ("the docker test is only relevant to the linux build" )
49
57
elif platform .machine () not in ["x86_64" , "i686" ]:
50
58
if manylinux_image in ["manylinux1" , "manylinux2010" ]:
51
59
pytest .skip ("manylinux1 and 2010 doesn't exist for non-x86 architectures" )
60
+ elif manylinux_image == "manylinux_2_28" and platform .machine () == "s390x" :
61
+ pytest .skip ("manylinux_2_28 doesn't exist for s390x architecture" )
62
+ elif manylinux_image == "manylinux_2_28" and platform .machine () == "i686" :
63
+ pytest .skip ("manylinux_2_28 doesn't exist for i686 architecture" )
52
64
53
65
project_dir = tmp_path / "project"
54
66
project_with_manylinux_symbols .generate (project_dir )
@@ -74,6 +86,9 @@ def test(manylinux_image, tmp_path):
74
86
if manylinux_image in {"manylinux2010" }:
75
87
# We don't have a manylinux2010 image for PyPy 3.9, CPython 3.11
76
88
add_env ["CIBW_SKIP" ] = "pp39* cp311*"
89
+ if manylinux_image == "manylinux_2_28" and platform .machine () == "x86_64" :
90
+ # We don't have a manylinux_2_28 image for i686
91
+ add_env ["CIBW_ARCHS" ] = "x86_64"
77
92
78
93
actual_wheels = utils .cibuildwheel_run (project_dir , add_env = add_env )
79
94
@@ -91,7 +106,13 @@ def test(manylinux_image, tmp_path):
91
106
if manylinux_image in {"manylinux1" }:
92
107
# remove PyPy & CPython 3.10 and above
93
108
expected_wheels = [w for w in expected_wheels if "-pp" not in w and "-cp31" not in w ]
109
+
94
110
if manylinux_image in {"manylinux2010" }:
95
111
# remove PyPy 3.9 & CPython 3.11
96
112
expected_wheels = [w for w in expected_wheels if "-pp39" not in w and "-cp311" not in w ]
113
+
114
+ if manylinux_image == "manylinux_2_28" and platform .machine () == "x86_64" :
115
+ # We don't have a manylinux_2_28 image for i686
116
+ expected_wheels = [w for w in expected_wheels if "i686" not in w ]
117
+
97
118
assert set (actual_wheels ) == set (expected_wheels )
0 commit comments