diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2019-11-04 17:49:16 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-11-05 15:35:39 +0000 |
commit | 8e03be8ae148648e508d5cd66dbb021973e926cd (patch) | |
tree | 79e8b9f069fbc0f29957765e489ee80d36fabbf6 /testing/libguestfs/python-3.8.patch | |
parent | d95a53813d93148146b793532b55873416d9af63 (diff) | |
download | aports-8e03be8ae148648e508d5cd66dbb021973e926cd.tar.bz2 aports-8e03be8ae148648e508d5cd66dbb021973e926cd.tar.xz |
testing/libguestfs: rebuild against python 3.8
Diffstat (limited to 'testing/libguestfs/python-3.8.patch')
-rw-r--r-- | testing/libguestfs/python-3.8.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/testing/libguestfs/python-3.8.patch b/testing/libguestfs/python-3.8.patch new file mode 100644 index 0000000000..a0090f6f14 --- /dev/null +++ b/testing/libguestfs/python-3.8.patch @@ -0,0 +1,49 @@ + py3-$pkgname:_py +n 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 |