From 78fbc44f795e7e07f6ddaa8e3e266c378f05a257 Mon Sep 17 00:00:00 2001 From: Shaan Majid <70789625+shaanmajid@users.noreply.github.com> Date: Fri, 9 Oct 2026 19:48:18 -0700 Subject: [PATCH] build: add Python 3.15 free-threaded wheels --- .github/workflows/tests.yml | 5 ++++- scripts/build-armv7l-cross.sh | 7 +++++-- tests/test_doctests.py | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index eb4b4c294..ce31073cb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -65,7 +65,7 @@ jobs: CIBW_ENVIRONMENT_MACOS: PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig LDFLAGS=-headerpad_max_install_names CIBW_ENVIRONMENT_WINDOWS: INCLUDE=C:\\cibw\\vendor\\include LIB=C:\\cibw\\vendor\\lib PYAV_SKIP_TESTS=unicode_filename CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: delvewheel repair --add-path C:\cibw\vendor\bin -w {dest_dir} {wheel} - CIBW_BUILD: "cp312* cp314t*" + CIBW_BUILD: "cp312* cp314t* cp315t*" CIBW_BUILD_FRONTEND: uv CIBW_TEST_COMMAND: mv {project}/av {project}/av.disabled && python -m pytest {package}/tests && mv {project}/av.disabled {project}/av CIBW_TEST_REQUIRES: pytest numpy @@ -92,8 +92,10 @@ jobs: run: | uv venv --seed --python 3.12 .venv-3.12 uv venv --seed --python 3.14t .venv-3.14t + uv venv --seed --python 3.15t .venv-3.15t uv pip install --python .venv-3.12/bin/python -U "cython>=3.1.0,<4" "setuptools>=77.0" wheel uv pip install --python .venv-3.14t/bin/python -U "cython>=3.1.0,<4" "setuptools>=77.0" wheel + uv pip install --python .venv-3.15t/bin/python -U "cython>=3.3.0,<4" "setuptools>=78.0" wheel # patchelf 0.18 (ubuntu-24.04's system version) corrupts ELF files # with large p_align; pin <0.18 for auditwheel to use. uv pip install --python .venv-3.12/bin/python -U ziglang auditwheel 'patchelf<0.18' @@ -101,6 +103,7 @@ jobs: env: HOST_PY312: .venv-3.12/bin/python HOST_PY314T: .venv-3.14t/bin/python + HOST_PY315T: .venv-3.15t/bin/python TOOLS_PY: .venv-3.12/bin/python run: bash scripts/build-armv7l-cross.sh - name: Upload wheels diff --git a/scripts/build-armv7l-cross.sh b/scripts/build-armv7l-cross.sh index f7928cc1f..7f7c7896d 100755 --- a/scripts/build-armv7l-cross.sh +++ b/scripts/build-armv7l-cross.sh @@ -7,7 +7,7 @@ # armv7l without running any armv7l code. The target Python trees + system libs # are copied out of the manylinux armv7l image with `docker cp` (no execution). # -# Builds two manylinux (glibc) wheels: cp312-abi3 and cp314t. +# Builds three manylinux (glibc) wheels: cp312-abi3, cp314t, and cp315t. # musllinux armv7l is skipped: musl ffmpeg needs system libs (libdrm, libxcb*, # libbz2) the musllinux image doesn't ship for auditwheel to bundle. @@ -18,9 +18,11 @@ root="$(cd "$here/.." && pwd)" cd "$root" # Host interpreters that drive each build (must match the wheel's Python: 3.12 -# emits cp312-abi3, 3.14t emits cp314t). zig/auditwheel run from TOOLS_PY. +# emits cp312-abi3; free-threaded hosts emit their matching tags). +# zig/auditwheel run from TOOLS_PY. HOST_PY312="${HOST_PY312:-python3.12}" HOST_PY314T="${HOST_PY314T:-python3.14t}" +HOST_PY315T="${HOST_PY315T:-python3.15t}" TOOLS_PY="${TOOLS_PY:-python3}" DIST_DIR="${DIST_DIR:-$root/dist}" @@ -134,6 +136,7 @@ build_one() { extract_image build_one "$HOST_PY312" "cp312-cp312" build_one "$HOST_PY314T" "cp314*-cp314t" +build_one "$HOST_PY315T" "cp315*-cp315t" echo echo "Built armv7l wheels:" diff --git a/tests/test_doctests.py b/tests/test_doctests.py index 63220889c..ab6079cb7 100644 --- a/tests/test_doctests.py +++ b/tests/test_doctests.py @@ -45,7 +45,7 @@ def register_doctests(mod): for test in suite._tests: def func(self): - return test.runTest() + return test.debug() name = str("test_" + re.sub("[^a-zA-Z0-9]+", "_", test.id()).strip("_")) func.__name__ = name