Skip to content

Commit cb5eb8b

Browse files
authored
chore: add tests on manylinux_2_34 (#521)
1 parent 9394d48 commit cb5eb8b

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ To update these images manually, run::
140140
docker pull quay.io/pypa/manylinux2010_x86_64
141141
docker pull quay.io/pypa/manylinux2014_x86_64
142142
docker pull quay.io/pypa/manylinux_2_28_x86_64
143+
docker pull quay.io/pypa/manylinux_2_34_x86_64
144+
docker pull quay.io/pypa/musllinux_1_2_x86_64
143145

144146
You may also remove these images using ``docker rmi``.
145147

tests/integration/test_manylinux.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@
2626
MANYLINUX2010_IMAGE_ID = f"quay.io/pypa/manylinux2010_{PLATFORM}:latest"
2727
MANYLINUX2014_IMAGE_ID = f"quay.io/pypa/manylinux2014_{PLATFORM}:latest"
2828
MANYLINUX_2_28_IMAGE_ID = f"quay.io/pypa/manylinux_2_28_{PLATFORM}:latest"
29+
MANYLINUX_2_34_IMAGE_ID = f"quay.io/pypa/manylinux_2_34_{PLATFORM}:latest"
2930
if PLATFORM in {"i686", "x86_64"}:
3031
MANYLINUX_IMAGES = {
3132
"manylinux_2_5": MANYLINUX1_IMAGE_ID,
3233
"manylinux_2_12": MANYLINUX2010_IMAGE_ID,
3334
"manylinux_2_17": MANYLINUX2014_IMAGE_ID,
3435
"manylinux_2_28": MANYLINUX_2_28_IMAGE_ID,
36+
"manylinux_2_34": MANYLINUX_2_34_IMAGE_ID,
3537
}
3638
POLICY_ALIASES = {
3739
"manylinux_2_5": ["manylinux1"],
@@ -42,6 +44,7 @@
4244
MANYLINUX_IMAGES = {
4345
"manylinux_2_17": MANYLINUX2014_IMAGE_ID,
4446
"manylinux_2_28": MANYLINUX_2_28_IMAGE_ID,
47+
"manylinux_2_34": MANYLINUX_2_34_IMAGE_ID,
4548
}
4649
POLICY_ALIASES = {
4750
"manylinux_2_17": ["manylinux2014"],
@@ -61,6 +64,7 @@
6164
"manylinux_2_12": "devtoolset-8",
6265
"manylinux_2_17": "devtoolset-10",
6366
"manylinux_2_28": "gcc-toolset-13",
67+
"manylinux_2_34": "gcc-toolset-14",
6468
"musllinux_1_2": "devtoolset-not-present",
6569
}
6670
PATH_DIRS = [

tests/integration/testdependencies/dependency.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,22 @@
33
#include <stdlib.h>
44
#include <stdint.h>
55
#include <math.h>
6+
#include <pthread.h>
67
#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 28)
78
#include <threads.h>
89
#endif
910

1011
int dep_run()
1112
{
12-
#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 28)
13+
#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 34)
14+
// pthread_mutexattr_init was moved to libc.so.6 in manylinux_2_34+
15+
pthread_mutexattr_t attr;
16+
int sts = pthread_mutexattr_init(&attr);
17+
if (sts == 0) {
18+
pthread_mutexattr_destroy(&attr);
19+
}
20+
return sts;
21+
#elif defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 28)
1322
return thrd_equal(thrd_current(), thrd_current()) ? 0 : 1;
1423
#elif defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 24)
1524
return (int)nextupf(0.0F);

tests/integration/testdependencies/testdependencies.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <stdlib.h>
66
#include <stdint.h>
77
#include <math.h>
8+
#include <pthread.h>
89
#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 28)
910
#include <threads.h>
1011
#endif
@@ -23,6 +24,13 @@ run(PyObject *self, PyObject *args)
2324

2425
#ifdef WITH_DEPENDENCY
2526
res = dep_run();
27+
#elif defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 34)
28+
// pthread_mutexattr_init was moved to libc.so.6 in manylinux_2_34+
29+
pthread_mutexattr_t attr;
30+
res = pthread_mutexattr_init(&attr);
31+
if (res == 0) {
32+
pthread_mutexattr_destroy(&attr);
33+
}
2634
#elif defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 28)
2735
res = thrd_equal(thrd_current(), thrd_current()) ? 0 : 1;
2836
#elif defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 24)

0 commit comments

Comments
 (0)