[PATCH 1/5] python-utils-r1.eclass: Reorder impls for ascending versions
Michał Górny <[email protected]>
| Newsgroups | gmane.linux.gentoo.devel |
|---|---|
| Message-ID | <[email protected]> |
Reorder the implementations so that the builds are run in ascending versions, rather than having all freethreading builds done first. This still preserves the assumption that for a given Python version, freethreading build is done before the GIL-enabled build (and therefore the latter is preferred -- and we want this as long as we consider freethreading experimental and potentially suboptimal for general use). However, it also ensures that a newer Python version would not be built before an earlier version. This is an assumption we've made when implementing wheel reuse. Normally, wheels encode the minimum supported Python version using the Python tag. For example, an ABI3 wheel for Python 3.12+ is named *-cp312-abi3-*.whl. However, rather than parsing these tags, we rely on the assumption that a given Python version needs to be able to run wheels it is building, so it will not output wheels requiring a newer Python versions. Therefore, as long as earlier versions are built first, we can assume that the wheels in the reuse list will be compatible with the subsequent implementations. For this assumption to hold, we were relying on the fact that freethreading builds did not support the limited API, and therefore could not produce reusable wheels. With Python 3.15, this is no longer the case and a 3.15t build can produce an *-cp315-abi3.abi3t-*.whl that is compatible with GIL-enabled Python 3.15, but not lower versions. This did not explode straight away because our overcautious logic specifically required *-abi3-*.whl, but it's still worth fixing. Of course, it would probably be even better to actually look at the Python tag, but one does not preclude the other. Signed-off-by: Michał Górny <[email protected]> --- eclass/python-utils-r1.eclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 7c3b3d985f2aa..52b7e2bd4f062 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -39,8 +39,8 @@ inherit multiprocessing toolchain-funcs # @DESCRIPTION: # All supported Python implementations, most preferred last. _PYTHON_ALL_IMPLS=( - python3_{14..15}t - python3_{12..15} + python3_{12..13} + python3_{14..15}{t,} ) readonly _PYTHON_ALL_IMPLS