File: 0004-Avoid-the-hardcoded-list-of-Python-versions.patch

package info (click to toggle)
gpgme1.0 1.24.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,264 kB
  • sloc: ansic: 51,655; cpp: 27,213; sh: 12,776; python: 6,020; javascript: 3,773; makefile: 1,792; lisp: 1,652; sed: 37
file content (29 lines) | stat: -rw-r--r-- 1,144 bytes parent folder | download
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