Add proposed patch for Python 3.8 (RHBZ#1705482).
This commit is contained in:
parent
29e15986f0
commit
e9087981ae
@ -0,0 +1,54 @@
|
|||||||
|
From c4638739d684609471cfa94c08e7b90c70ea3e83 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||||
|
Date: Fri, 31 May 2019 13:07:25 +0100
|
||||||
|
Subject: [PATCH] python: PYTHON_LIBS is not set in Python 3.8 (RHBZ#1705482).
|
||||||
|
|
||||||
|
Python 3.8 no longer links C extensions to -lpython, instead relying
|
||||||
|
on the fact that the python binary itself already contains those
|
||||||
|
symbols. This means $PYTHON_LIBS is empty and so the Python bindings
|
||||||
|
are not built.
|
||||||
|
|
||||||
|
Use a different test to see if the python module is available.
|
||||||
|
---
|
||||||
|
m4/guestfs-python.m4 | 6 +++++-
|
||||||
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/m4/guestfs-python.m4 b/m4/guestfs-python.m4
|
||||||
|
index 7d4c991bb..befa9b102 100644
|
||||||
|
--- a/m4/guestfs-python.m4
|
||||||
|
+++ b/m4/guestfs-python.m4
|
||||||
|
@@ -33,14 +33,17 @@ AS_IF([test "x$enable_python" != "xno"],[
|
||||||
|
PYTHON_VERSION_MINOR=`$PYTHON -c "import sys; print (sys.version_info@<:@1@:>@)"`
|
||||||
|
PYTHON_VERSION="$PYTHON_VERSION_MAJOR.$PYTHON_VERSION_MINOR"
|
||||||
|
AC_MSG_RESULT([$PYTHON_VERSION])
|
||||||
|
+
|
||||||
|
# Debian: python-2.7.pc, python-3.2.pc
|
||||||
|
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])
|
||||||
|
],[
|
||||||
|
PKG_CHECK_MODULES([PYTHON], [python],[
|
||||||
|
+ have_python_module=1
|
||||||
|
AC_SUBST([PYTHON_CFLAGS])
|
||||||
|
AC_SUBST([PYTHON_LIBS])
|
||||||
|
AC_SUBST([PYTHON_VERSION])
|
||||||
|
@@ -49,6 +52,7 @@ AS_IF([test "x$enable_python" != "xno"],[
|
||||||
|
AC_MSG_WARN([python $PYTHON_VERSION not found])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
+
|
||||||
|
AC_MSG_CHECKING([Python prefix])
|
||||||
|
PYTHON_PREFIX=`$PYTHON -c "import sys; print (sys.prefix)"`
|
||||||
|
AC_MSG_RESULT([$PYTHON_PREFIX])
|
||||||
|
@@ -101,4 +105,4 @@ AS_IF([test "x$enable_python" != "xno"],[
|
||||||
|
AC_SUBST(PYTHON_EXT_SUFFIX)
|
||||||
|
])
|
||||||
|
AM_CONDITIONAL([HAVE_PYTHON],
|
||||||
|
- [test "x$PYTHON" != "xno" && test "x$PYTHON_LIBS" != "x" ])
|
||||||
|
+ [test "x$PYTHON" != "xno" && test "x$have_python_module" = "x1" ])
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
@ -43,7 +43,7 @@ Summary: Access and modify virtual machine disk images
|
|||||||
Name: libguestfs
|
Name: libguestfs
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 1.40.2
|
Version: 1.40.2
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
|
|
||||||
# Source and patches.
|
# Source and patches.
|
||||||
@ -67,6 +67,9 @@ Source6: yum.conf.in
|
|||||||
Source7: libguestfs.keyring
|
Source7: libguestfs.keyring
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# See https://bugzilla.redhat.com/show_bug.cgi?id=1705482
|
||||||
|
Patch0001: 0001-python-PYTHON_LIBS-is-not-set-in-Python-3.8-RHBZ-170.patch
|
||||||
|
|
||||||
%if 0%{patches_touch_autotools}
|
%if 0%{patches_touch_autotools}
|
||||||
BuildRequires: autoconf, automake, libtool, gettext-devel
|
BuildRequires: autoconf, automake, libtool, gettext-devel
|
||||||
%endif
|
%endif
|
||||||
@ -1310,6 +1313,9 @@ install -m 0644 utils/boot-benchmark/boot-benchmark.1 $RPM_BUILD_ROOT%{_mandir}/
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri May 31 2019 Richard W.M. Jones <rjones@redhat.com> - 1:1.40.2-5
|
||||||
|
- Add proposed patch for Python 3.8 (RHBZ#1705482).
|
||||||
|
|
||||||
* Mon Mar 18 2019 Richard W.M. Jones <rjones@redhat.com> - 1:1.40.2-4
|
* Mon Mar 18 2019 Richard W.M. Jones <rjones@redhat.com> - 1:1.40.2-4
|
||||||
- Remove Java bindings.
|
- Remove Java bindings.
|
||||||
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/CW4XMOIKMNRRPAZ4H2ER7VPBY6YV2ODL/#YHTZ7IGVTKPWCBOY5C6UW7BMX7F35R5Q
|
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/CW4XMOIKMNRRPAZ4H2ER7VPBY6YV2ODL/#YHTZ7IGVTKPWCBOY5C6UW7BMX7F35R5Q
|
||||||
|
Loading…
Reference in New Issue
Block a user