[PATCH 3/5] distutils-r1.eclass: Support abi3t wheel reuse for freethreading

Michał Górny <[email protected]>
Newsgroups gmane.linux.gentoo.devel
Message-ID <[email protected]>
Add explicit support for reusing *-abi3t-* wheels when installing for
freethreading Python.  Tested by calling src_compile() in cryptography
twice.

Signed-off-by: Michał Górny <[email protected]>
---
 eclass/distutils-r1.eclass | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 39d63601e3020..f7cb6e78442e8 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1269,6 +1269,12 @@ distutils-r1_python_compile() {
 					${EPYTHON} == python* &&
 					${EPYTHON} != *t &&
 					.${abi_tag}. == *.abi3.*
+				) ||
+				# For freethreading CPython, we can reuse ABI3t wheels.
+				# Same as above, we're relying on the ordering.
+				(
+					${EPYTHON} == python*t &&
+					.${abi_tag}. == *.abi3t.*
 				)
 			]]; then
 				distutils_wheel_install "${BUILD_DIR}/install" "${whl}"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.