1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
From: Stefano Rivera <stefanor@debian.org>
Date: Tue, 23 Nov 2021 19:14:16 -0400
Subject: Avoid the hardcoded list of Python versions
Instead stick to Debian's list of supported Pythons.
Bug-Debian: https://bugs.debian.org/998471
Forwarded: not-needed
---
configure.ac | 4 ++++
1 file changed, 4 insertions(+)
--- a/configure.ac
+++ b/configure.ac
@@ -645,10 +645,14 @@ if test "$found_py" = "1"; then
# Remove duplicates.
PYTHONS="$(echo $PYTHONS | tr '[[:space:]]' '\n' | sort | uniq | tr '\n' ' ' | sed -e 's/ $//')"
PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS | tr '[[:space:]]' '\n' | sort | uniq | tr '\n' ' ' | sed -e 's/ $//')"
+ # Debian: Avoid relying on the hard-coded list of python versions being up to date:
+ PYTHONS="$(py3versions -s | tr ' ' '\n' | sed s,^,/usr/bin/, | tr '\n' ' ')"
+ PYTHON_VERSIONS="$(py3versions -sv)"
+
if test "$PYTHON_VERSIONS"; then
enabled_languages_v=$(echo $enabled_languages | sed -Ee "s/python[[23]]?/python ($PYTHON_VERSIONS)/")
enabled_languages=$(echo $enabled_languages | sed -Ee "s/python[[23]]?/python/")
else
if test "$explicit_languages" = "1"; then
|