summaryrefslogtreecommitdiff
path: root/eclass/python-utils-r1.eclass
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@gentoo.org>2025-09-04 14:24:48 -0400
committerMichał Górny <mgorny@gentoo.org>2025-09-06 09:00:53 +0200
commit07446fc250c157ce77518bcf61f30c405f9433ef (patch)
treebd3d7cb912b8d628088a7c8cd0f2bd50c88651b9 /eclass/python-utils-r1.eclass
parent7615a4a7c55df90f256a0365caf732197da8bc59 (diff)
downloadgentoo-07446fc250c157ce77518bcf61f30c405f9433ef.tar.gz
gentoo-07446fc250c157ce77518bcf61f30c405f9433ef.tar.bz2
gentoo-07446fc250c157ce77518bcf61f30c405f9433ef.zip
python-utils-r1.eclass: replace 2to3 with "unsupported" wrapper for 3.13+
It has been removed upstream. Due to the use of a symlink for wrapping it (as opposed to a shell script like python / python-config) this meant searching PATH didn't find the broken symlink, and instead found /usr/bin/2to3-3.12 with a 3.13 impl. Check the version of EPYTHON and add it to nonsupp wrappers instead of making a symlink. Reported-by: Paul Zander <negril.nx+gentoo@gmail.com> Signed-off-by: Eli Schwartz <eschwartz@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org> Part-of: https://github.com/gentoo/gentoo/pull/43549 Closes: https://github.com/gentoo/gentoo/pull/43549 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/python-utils-r1.eclass')
-rw-r--r--eclass/python-utils-r1.eclass8
1 files changed, 6 insertions, 2 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 13ed87501200..f454a066a352 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -929,8 +929,12 @@ _python_wrapper_setup() {
chmod +x "${workdir}/bin/python-config" \
"${workdir}/bin/python3-config" || die
- # Python 2.6+.
- ln -s "${PYTHON/python/2to3-}" "${workdir}"/bin/2to3 || die
+ # Python 2.6+. Deprecated in 3.11, removed in 3.13.
+ if ver_test ${EPYTHON#python} -lt 3.13; then
+ ln -s "${PYTHON/python/2to3-}" "${workdir}"/bin/2to3 || die
+ else
+ nonsupp+=( 2to3 )
+ fi
# Python 2.7+.
ln -s "${EPREFIX}"/usr/$(get_libdir)/pkgconfig/${EPYTHON/n/n-}.pc \