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

package info (click to toggle)
gpgmepy 2.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,576 kB
  • sloc: sh: 12,050; python: 5,958; ansic: 1,001; makefile: 368; sed: 37
file content (29 lines) | stat: -rw-r--r-- 977 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
@@ -318,10 +318,14 @@ else
 
     # 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 -z "$PYTHON_VERSIONS"; then
         AC_MSG_ERROR([[
 ***
 *** Please install the python development packages.
 ***]])