From 04bd35fa5cc7ab043286813787981849fd050aed Mon Sep 17 00:00:00 2001 From: mayeut Date: Sun, 24 Dec 2023 13:09:37 +0100 Subject: [PATCH 1/4] feat: add CPython 3.13 `--disable-gil` build --- docker/Dockerfile | 5 +++++ tests/run_tests.sh | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 2f8c551f..555d1fc6 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -141,6 +141,10 @@ FROM build_cpython AS build_cpython313 COPY build_scripts/cpython-pubkey-312-313.txt /build_scripts/cpython-pubkeys.txt RUN manylinux-entrypoint /build_scripts/build-cpython.sh 3.13.0b1 +FROM build_cpython AS build_cpython313_nogil +COPY build_scripts/cpython-pubkey-312-313.txt /build_scripts/cpython-pubkeys.txt +RUN manylinux-entrypoint /build_scripts/build-cpython.sh 3.13.0b1 nogil + FROM runtime_base COPY --from=build_git /manylinux-rootfs / @@ -154,6 +158,7 @@ RUN --mount=type=bind,target=/build_cpython36,from=build_cpython36 \ --mount=type=bind,target=/build_cpython311,from=build_cpython311 \ --mount=type=bind,target=/build_cpython312,from=build_cpython312 \ --mount=type=bind,target=/build_cpython313,from=build_cpython313 \ + --mount=type=bind,target=/build_cpython313_nogil,from=build_cpython313_nogil \ mkdir -p /opt/_internal && \ cp -rf /build_cpython*/opt/_internal/* /opt/_internal/ && \ manylinux-entrypoint /opt/_internal/build_scripts/finalize.sh \ diff --git a/tests/run_tests.sh b/tests/run_tests.sh index 63596221..663bcfa3 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -18,15 +18,15 @@ else fi if [ "${AUDITWHEEL_POLICY:0:10}" == "musllinux_" ]; then - EXPECTED_PYTHON_COUNT=8 - EXPECTED_PYTHON_COUNT_ALL=8 + EXPECTED_PYTHON_COUNT=9 + EXPECTED_PYTHON_COUNT_ALL=9 else if [ "${AUDITWHEEL_ARCH}" == "x86_64" ] || [ "${AUDITWHEEL_ARCH}" == "i686" ] || [ "${AUDITWHEEL_ARCH}" == "aarch64" ]; then - EXPECTED_PYTHON_COUNT=12 - EXPECTED_PYTHON_COUNT_ALL=12 + EXPECTED_PYTHON_COUNT=13 + EXPECTED_PYTHON_COUNT_ALL=13 else - EXPECTED_PYTHON_COUNT=8 - EXPECTED_PYTHON_COUNT_ALL=8 + EXPECTED_PYTHON_COUNT=9 + EXPECTED_PYTHON_COUNT_ALL=9 fi fi PYTHON_COUNT=$(manylinux-interpreters list --installed | wc -l) From ca5dadb8e9e9ad807469e02474b2b0b696d54b35 Mon Sep 17 00:00:00 2001 From: mayeut Date: Mon, 13 May 2024 07:58:07 +0200 Subject: [PATCH 2/4] fix: use pip>=24.1b1 on python 3.13 --- docker/build_scripts/requirements3.13.txt | 6 +++--- requirements.in | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docker/build_scripts/requirements3.13.txt b/docker/build_scripts/requirements3.13.txt index 51bd26fd..d143739d 100644 --- a/docker/build_scripts/requirements3.13.txt +++ b/docker/build_scripts/requirements3.13.txt @@ -7,9 +7,9 @@ packaging==24.0 \ --hash=sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5 \ --hash=sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9 # via build -pip==24.0 \ - --hash=sha256:ba0d021a166865d2265246961bec0152ff124de910c5cc39f1156ce3fa7c69dc \ - --hash=sha256:ea9bd1a847e8c5774a5777bb398c19e80bcd4e2aa16a4b301b718fe6f593aba2 +pip==24.1b1 \ + --hash=sha256:752516cffafef5cf29d3fb2f06c978f27e98709654689cf277b2fce984c7a591 \ + --hash=sha256:a9bd4c037d72325b4e903ec3f383263deea3eb73cd01db7a844edd026fc68afe pyproject-hooks==1.1.0 \ --hash=sha256:4b37730834edbd6bd37f26ece6b44802fb1c1ee2ece0e54ddff8bfc06db86965 \ --hash=sha256:7ceeefe9aec63a1064c18d939bdc3adf2d8aa1988a510afec15151578b232aa2 diff --git a/requirements.in b/requirements.in index 70af76cf..f11409e0 100644 --- a/requirements.in +++ b/requirements.in @@ -1,4 +1,5 @@ -pip +pip>=24.1b1 ; python_version >= '3.13' +pip ; python_version < '3.13' setuptools wheel build From 03d6cf36949beb94be91ec634675fefbe86f164d Mon Sep 17 00:00:00 2001 From: mayeut Date: Mon, 13 May 2024 08:09:58 +0200 Subject: [PATCH 3/4] fix: do not install setuptools/wheel on python 3.13+ We should probably remove this on other python versions but since it's been there for quite some time, keep them to prevent regressions downstream. --- docker/build_scripts/requirements3.13.txt | 6 ------ requirements.in | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/docker/build_scripts/requirements3.13.txt b/docker/build_scripts/requirements3.13.txt index d143739d..615c5593 100644 --- a/docker/build_scripts/requirements3.13.txt +++ b/docker/build_scripts/requirements3.13.txt @@ -14,9 +14,3 @@ pyproject-hooks==1.1.0 \ --hash=sha256:4b37730834edbd6bd37f26ece6b44802fb1c1ee2ece0e54ddff8bfc06db86965 \ --hash=sha256:7ceeefe9aec63a1064c18d939bdc3adf2d8aa1988a510afec15151578b232aa2 # via build -setuptools==69.5.1 \ - --hash=sha256:6c1fccdac05a97e598fb0ae3bbed5904ccb317337a51139dcd51453611bbb987 \ - --hash=sha256:c636ac361bc47580504644275c9ad802c50415c7522212252c033bd15f301f32 -wheel==0.43.0 \ - --hash=sha256:465ef92c69fa5c5da2d1cf8ac40559a8c940886afcef87dcf14b9470862f1d85 \ - --hash=sha256:55c570405f142630c6b9f72fe09d9b67cf1477fcf543ae5b8dcb1f5b7377da81 diff --git a/requirements.in b/requirements.in index f11409e0..5115e938 100644 --- a/requirements.in +++ b/requirements.in @@ -1,6 +1,6 @@ pip>=24.1b1 ; python_version >= '3.13' pip ; python_version < '3.13' -setuptools -wheel +setuptools ; python_version < '3.13' +wheel ; python_version < '3.13' build packaging From 5be1d7956a08249073fca559365b4b6b461be3f0 Mon Sep 17 00:00:00 2001 From: mayeut Date: Mon, 13 May 2024 08:28:31 +0200 Subject: [PATCH 4/4] fix: use `sysconfig` rather than `distutils` in tests/manylinux-check.py --- tests/manylinux-check.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/manylinux-check.py b/tests/manylinux-check.py index ad84347a..980fd986 100644 --- a/tests/manylinux-check.py +++ b/tests/manylinux-check.py @@ -5,7 +5,7 @@ def is_manylinux1_compatible(): # Only Linux, and only x86-64 / i686 - from distutils.util import get_platform + from sysconfig import get_platform if get_platform() not in ["linux-x86_64", "linux-i686"]: return False @@ -23,7 +23,7 @@ def is_manylinux1_compatible(): def is_manylinux2010_compatible(): # Only Linux, and only x86-64 / i686 - from distutils.util import get_platform + from sysconfig import get_platform if get_platform() not in ["linux-x86_64", "linux-i686"]: return False @@ -41,7 +41,7 @@ def is_manylinux2010_compatible(): def is_manylinux2014_compatible(): # Only Linux, and only supported architectures - from distutils.util import get_platform + from sysconfig import get_platform if get_platform() not in [ "linux-x86_64", "linux-i686",