Skip to content

pyproject: fix the declared Python floor and the license form - #24

Merged
insatomcat merged 1 commit into
mainfrom
fix/packaging-metadata
Sep 14, 2026
Merged

insatomcat merged 1 commit into
mainfrom
fix/packaging-metadata

Conversation

@insatomcat

@insatomcat insatomcat commented Sep 7, 2026

Copy link
Copy Markdown
Member

Second follow-up to #22, which left the packaging metadata alone because both fixes depend on the supported targets. Independent of #23.

requires-python said >=3.6, which is false. check.py:18 and ovs.py:76 call subprocess.run(capture_output=...), added in 3.7. Now >=3.9, the lowest version the CI matrix actually verifies. Every live target is above it: Debian trixie 3.13, Yocto wrynose 3.14, kirkstone 3.10.

license was a deprecated TOML table, warning on every build, removal announced for 2027-02-18. Now the SPDX string plus license-files, with build-system raised to setuptools 77.

Checked on the built wheel: License-Expression: Apache-2.0 under Metadata 2.4, LICENSE still shipped, build warning-free, still byte-for-byte reproducible under SOURCE_DATE_EPOCH.

The setuptools bump is safe for the maintained targets. Both Ansible roles install with --no-build-isolation, so build-system.requires is not honoured on target and the installed setuptools is what runs: trixie ships 78.1.1, wrynose 82.0.1, both above 77. kirkstone (59.5.0) and scarthgap (69.1.1) would fail on the string form, and their manifests already pin an older SRCREV.

The CI matrix already runs 3.9 to 3.13, so it matches the new declaration and needs no edit.

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 <florent.carli@rte-france.com>
@insatomcat
insatomcat force-pushed the fix/packaging-metadata branch from 2b4cf5c to e9bee3a Compare September 14, 2026 11:43
@sonarqubecloud

Copy link
Copy Markdown

@insatomcat
insatomcat merged commit 7bf6c85 into main Sep 14, 2026
10 checks passed
@insatomcat
insatomcat deleted the fix/packaging-metadata branch September 14, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants