Linux GPIO subsystem development
 help / color / mirror / Atom feed
* [libgpiod][PATCH] bindings: python: generate wheels for CPython 3.14
@ 2025-09-23 20:07 Vincent Fazio
  2025-09-26  9:54 ` Bartosz Golaszewski
  0 siblings, 1 reply; 2+ messages in thread
From: Vincent Fazio @ 2025-09-23 20:07 UTC (permalink / raw)
  To: linux-gpio; +Cc: vfazio, Vincent Fazio

Update cibuildwheel to add support for generating 3.14 wheels.

Configuration options for cibuildwheel have been moved to pyproject.toml
to keep it in line with other tools used by the bindings.

The configuration has been updated to skip generating free-threaded
wheels since the bindings do not support free-threaded builds [0] and
cibuildwheel generates them by default starting with CPython3.14 [1].

[0]: https://github.com/brgl/libgpiod/issues/117
[1]: https://github.com/pypa/cibuildwheel/pull/2503

Closes: https://github.com/brgl/libgpiod/issues/138
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
---
Testing was performed on CPython 3.14.0-rc2 for manylinux wheels and rc3
for musllinux wheels. Some test evidence is in the closing issue [0].

[0]: https://github.com/brgl/libgpiod/issues/138#issuecomment-3320487586
---
 bindings/python/generate_pypi_artifacts.sh | 6 ++----
 bindings/python/pyproject.toml             | 6 ++++++
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/bindings/python/generate_pypi_artifacts.sh b/bindings/python/generate_pypi_artifacts.sh
index d5dbd31..d36c606 100755
--- a/bindings/python/generate_pypi_artifacts.sh
+++ b/bindings/python/generate_pypi_artifacts.sh
@@ -108,14 +108,12 @@ python3 -m "${venv_module}" .venv
 venv_python="${temp_dir}/.venv/bin/python"
 
 # Install build dependencies
-${venv_python} -m pip install build==1.2.2.post1 cibuildwheel==2.21.3
+${venv_python} -m pip install build==1.3.0 cibuildwheel==3.2.0
 
 LIBGPIOD_VERSION=${src_version} ${venv_python} -m build --sdist --outdir ./dist "${source_dir}"
 sdist=$(find ./dist -name '*.tar.gz')
 
-# Target only CPython and X86_64 + AArch64 Linux wheels unless specified otherwise via environment variables
-CIBW_BUILD=${CIBW_BUILD:-"cp*"} CIBW_ARCHS=${CIBW_ARCHS:-"x86_64,aarch64"} \
-	${venv_python} -m cibuildwheel --platform linux "${sdist}" --output-dir dist/
+${venv_python} -m cibuildwheel --platform linux "${sdist}" --output-dir dist/
 
 if [ "${force}" -eq 1 ]; then
 	printf "\nRemoving files from %s/dist/\n" "${output_dir}"
diff --git a/bindings/python/pyproject.toml b/bindings/python/pyproject.toml
index 3217412..45d50ae 100644
--- a/bindings/python/pyproject.toml
+++ b/bindings/python/pyproject.toml
@@ -27,6 +27,7 @@ classifiers = [
   "Programming Language :: Python :: 3.11",
   "Programming Language :: Python :: 3.12",
   "Programming Language :: Python :: 3.13",
+  "Programming Language :: Python :: 3.14",
 ]
 
 [project.urls]
@@ -80,3 +81,8 @@ ignore=[
 "gpiod/__init__.py" = ["F403", "F405"]  # ignore warnings about star imports
 "tests/__main__.py" = ["F403"]
 "tests/**.py" = ["F841"]  # ignore warnings about unused variables
+
+[tool.cibuildwheel]
+build = "cp*"
+skip = "cp31?t-*"  # Do not build free-threaded wheels
+archs = ["x86_64", "aarch64"]
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-09-26  9:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-23 20:07 [libgpiod][PATCH] bindings: python: generate wheels for CPython 3.14 Vincent Fazio
2025-09-26  9:54 ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox