From 6d17bc92b7abaf406008fd423caf5f8209f81b3e Mon Sep 17 00:00:00 2001 From: Matteo Bernardini Date: Wed, 3 Sep 2025 11:04:17 +0800 Subject: [PATCH] ci: use legacy `license` definition to allow building on py3.9 --- .gitignore | 3 ++- pyproject.toml | 22 +++++++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index ca51b03..3b79f24 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,8 @@ doc/_build/ gh-pages/ build/ dist/ +wheelhouse/ .vscode/ /__pycache__/ *.egg-info/ -*.raw +*.raw \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d9b9a24..cad5d6d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,8 +7,17 @@ This package contains wrappers for accessing the ALSA API from Python. It is fairly complete for PCM devices and Mixer access. """ readme.content-type = "text/plain" -license="PSF-2.0" -license-files=["LICENSE"] + +license.file = "LICENSE" + +# NOTE: license as a table has been deprecated by PEP-639, however support in +# setuptools has been introduced in v77.0 which is not installable on Python +# 3.9. Since this project doesn't constraint the minimum python version, we have +# to stick to the legacy `license` definition for now. + +# license="PSF-2.0" +# license-files=["LICENSE"] + classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", @@ -37,7 +46,7 @@ issues = "https://github.com/larsimmisch/pyalsaaudio/issues" [build-system] -requires = ["setuptools>=80.0"] +requires = ["setuptools"] build-backend = "setuptools.build_meta" @@ -48,6 +57,13 @@ ext-modules = [ [tool.cibuildwheel.linux] +# Use uv and build +build-frontend = "build[uv]" + +# NOTE: ensure to use the correct package manager depending on the manylinux +# image used. For AlmaLinux based images, use `yum`, for Debian based images +# use `apt`. `cibuildwheel` v3.1.4 defaults to manylinux_2_28, which is +# based on AlmaLinux 8. before-all = "yum install -y alsa-lib-devel"