From e9bee3a9f5b9eac9c8ecb30026aff64c5441ef8b Mon Sep 17 00:00:00 2001 From: Florent Carli Date: Mon, 7 Sep 2026 20:30:39 +0200 Subject: [PATCH] pyproject: fix the declared Python floor and the license form Two metadata defects, left untouched by #22 because both depend on what the project is supported on rather than on what the code tolerates. requires-python claimed ">=3.6". The package cannot run on 3.6: check.py and ovs.py call subprocess.run with capture_output, an argument added in 3.7, so system_check and clear_ovs raise TypeError there. The real floor is at least 3.7, and 3.7 and 3.8 are both end of life and absent from the GitHub runners, so neither can be tested. Declare ">=3.9", the lowest version the CI matrix actually verifies. Every live deployment target is above it: Debian trixie ships 3.13, Yocto wrynose 3.14, and the oldest manifest still around, kirkstone, 3.10. license was a TOML table, which setuptools deprecates in favour of a plain SPDX expression. The build printed a SetuptoolsDeprecationWarning on every run announcing removal by 2027-02-18. Use the string form together with license-files, and raise the build-system requirement to setuptools 77, the release that introduced both. The metadata now says License-Expression: Apache-2.0 under Metadata-Version 2.4, and the LICENSE file is still shipped in the wheel. The build is warning-free and stays byte-for-byte reproducible under SOURCE_DATE_EPOCH. The setuptools bump is safe for the two maintained targets, which is what matters here: both Ansible roles install with --no-build-isolation, so build-system requires is not honoured on target and the setuptools already present is the one that counts. Debian trixie ships 78.1.1 and Yocto wrynose 82.0.1, both above 77. Signed-off-by: Florent Carli --- pyproject.toml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1b41c1a..3e12a7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,9 +9,10 @@ authors = [ { name = "Florent Carli", email = "florent.carli@rte-france.com" }, { name = "Mathieu Dupré", email = "mathieu.dupre@savoirfairelinux.com" } ] -license = { text = "Apache-2.0" } +license = "Apache-2.0" +license-files = ["LICENSE"] readme = "README.md" -requires-python = ">=3.6" +requires-python = ">=3.9" dependencies = [ "PyYAML", ] @@ -30,7 +31,7 @@ setup_ovs = "setup_ovs.setup_ovs:main" Homepage = "https://github.com/seapath/python3-setup-ovs" [build-system] -requires = ["setuptools>=61", "wheel"] +requires = ["setuptools>=77"] build-backend = "setuptools.build_meta" [tool.pytest.ini_options]