* [gentoo-dev] [PATCH] python-utils-r1.eclass: replace 2to3 with "unsupported" wrapper for 3.13+
@ 2025-09-04 18:24 Eli Schwartz
2025-09-05 3:18 ` Michał Górny
0 siblings, 1 reply; 2+ messages in thread
From: Eli Schwartz @ 2025-09-04 18:24 UTC (permalink / raw
To: gentoo-dev; +Cc: Paul Zander
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>
---
eclass/python-utils-r1.eclass | 8 ++++++--
1 file 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 \
--
2.49.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [gentoo-dev] [PATCH] python-utils-r1.eclass: replace 2to3 with "unsupported" wrapper for 3.13+
2025-09-04 18:24 [gentoo-dev] [PATCH] python-utils-r1.eclass: replace 2to3 with "unsupported" wrapper for 3.13+ Eli Schwartz
@ 2025-09-05 3:18 ` Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2025-09-05 3:18 UTC (permalink / raw
To: gentoo-dev; +Cc: Paul Zander
[-- Attachment #1: Type: text/plain, Size: 1470 bytes --]
On Thu, 2025-09-04 at 14:24 -0400, Eli Schwartz wrote:
> 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>
> ---
> eclass/python-utils-r1.eclass | 8 ++++++--
> 1 file 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 \
LGTM (only eyeballed).
--
Best regards,
Michał Górny
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-09-05 3:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-04 18:24 [gentoo-dev] [PATCH] python-utils-r1.eclass: replace 2to3 with "unsupported" wrapper for 3.13+ Eli Schwartz
2025-09-05 3:18 ` Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox