File: python-Recognize-python-X.Y-embed-flavor-introduced-with-.patch

package info (click to toggle)
libguestfs 1%3A1.54.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 98,892 kB
  • sloc: ansic: 379,443; ml: 38,771; sh: 10,329; java: 9,631; cs: 6,377; haskell: 5,729; makefile: 5,178; python: 3,821; perl: 2,467; erlang: 2,461; ruby: 349; xml: 275; pascal: 257; javascript: 157; cpp: 10
file content (50 lines) | stat: -rw-r--r-- 2,021 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
From: Hilko Bengen <bengen@debian.org>
Date: Sat, 11 Jan 2020 00:15:24 +0100
Subject: python: Recognize python-X.Y-embed flavor introduced with Python 3.8
 in Debian

The non-"embed" .pc file does not include linker instructions. See
Debian bug #948017
---
 m4/guestfs-python.m4 | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/m4/guestfs-python.m4 b/m4/guestfs-python.m4
index ccb15d0..c4bc7a3 100644
--- a/m4/guestfs-python.m4
+++ b/m4/guestfs-python.m4
@@ -52,22 +52,30 @@ supports it.
 If you want to use Python 2, you will need to use libguestfs 1.40 or 1.42.0.])
         ])
 
-        # Debian: python-3.2.pc
-        PKG_CHECK_MODULES([PYTHON], [python-"$PYTHON_VERSION"],[
+        # Debian: python-3.2.pc. But also: python-3.8-embed.pc
+        PKG_CHECK_MODULES([PYTHON], [python-"$PYTHON_VERSION"-embed],[
             have_python_module=1
             AC_SUBST([PYTHON_CFLAGS])
             AC_SUBST([PYTHON_LIBS])
             AC_SUBST([PYTHON_VERSION])
             AC_DEFINE([HAVE_PYTHON],[1],[Python library found at compile time])
         ],[
-            PKG_CHECK_MODULES([PYTHON], [python],[
+            PKG_CHECK_MODULES([PYTHON], [python-"$PYTHON_VERSION"],[
                 have_python_module=1
                 AC_SUBST([PYTHON_CFLAGS])
                 AC_SUBST([PYTHON_LIBS])
                 AC_SUBST([PYTHON_VERSION])
                 AC_DEFINE([HAVE_PYTHON],[1],[Python library found at compile time])
             ],[
-                AC_MSG_WARN([python $PYTHON_VERSION not found])
+                PKG_CHECK_MODULES([PYTHON], [python],[
+                    have_python_module=1
+                    AC_SUBST([PYTHON_CFLAGS])
+                    AC_SUBST([PYTHON_LIBS])
+                    AC_SUBST([PYTHON_VERSION])
+                    AC_DEFINE([HAVE_PYTHON],[1],[Python library found at compile time])
+                ],[
+                    AC_MSG_WARN([python $PYTHON_VERSION not found])
+                ])
             ])
         ])