From bedcdc4cf921b70a8cfb16c6684668d0ac9e1942 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 27 Mar 2017 16:19:55 +0300 Subject: dnf: move the entire dnf/rpm4 stack to Python 3 [YOCTO #11180] Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- ...N_ABI-when-searching-for-python-libraries.patch | 30 ++++++++++++++++++++++ meta/recipes-devtools/rpm/rpm_git.bb | 16 +++++++----- 2 files changed, 39 insertions(+), 7 deletions(-) create mode 100644 meta/recipes-devtools/rpm/files/0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch (limited to 'meta/recipes-devtools/rpm') diff --git a/meta/recipes-devtools/rpm/files/0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch b/meta/recipes-devtools/rpm/files/0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch new file mode 100644 index 0000000000..b809332f21 --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch @@ -0,0 +1,30 @@ +From 36cf0ff26ece53e529e8b4f2d2f09acd8794b055 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Fri, 24 Mar 2017 15:35:47 +0200 +Subject: [PATCH] Add PYTHON_ABI when searching for python libraries. + +It has a value of 'm' when using Python3, and so without it +configure will not find the libraries. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 9c58467c1..a506ec819 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -642,7 +642,7 @@ AS_IF([test "$enable_python" = yes],[ + ]) + CPPFLAGS="$save_CPPFLAGS" + save_LIBS="$LIBS" +- AC_SEARCH_LIBS([Py_Main],[python${PYTHON_VERSION} python],[ ++ AC_SEARCH_LIBS([Py_Main],[python${PYTHON_VERSION}${PYTHON_ABI} python],[ + WITH_PYTHON_LIB="$ac_res" + ],[AC_MSG_ERROR([missing python library]) + ]) +-- +2.11.0 + diff --git a/meta/recipes-devtools/rpm/rpm_git.bb b/meta/recipes-devtools/rpm/rpm_git.bb index 9bccd91168..96f71d5bb5 100644 --- a/meta/recipes-devtools/rpm/rpm_git.bb +++ b/meta/recipes-devtools/rpm/rpm_git.bb @@ -13,8 +13,8 @@ simplify the process of creating graphical package managers or any \ other tools that need an intimate knowledge of RPM packages in order \ to function." -SUMMARY_python-rpm = "Python bindings for apps which will manupulate RPM packages" -DESCRIPTION_python-rpm = "The rpm-python package contains a module that permits applications \ +SUMMARY_python3-rpm = "Python bindings for apps which will manupulate RPM packages" +DESCRIPTION_python3-rpm = "The python3-rpm package contains a module that permits applications \ written in the Python programming language to use the interface \ supplied by the RPM Package Manager libraries." @@ -34,6 +34,7 @@ SRC_URI = "git://github.com/rpm-software-management/rpm \ file://0001-Do-not-hardcode-lib-rpm-as-the-installation-path-for.patch \ file://0001-Fix-build-with-musl-C-library.patch \ file://0001-Add-a-color-setting-for-mips64_n32-binaries.patch \ + file://0001-Add-PYTHON_ABI-when-searching-for-python-libraries.patch \ " PV = "4.13.90+git${SRCPV}" @@ -42,10 +43,11 @@ SRCREV = "a8e51b3bb05c6acb1d9b2e3d34f859ddda1677be" S = "${WORKDIR}/git" -DEPENDS = "nss libarchive db file popt xz dbus elfutils python" +DEPENDS = "nss libarchive db file popt xz dbus elfutils python3" DEPENDS_append_class-native = " file-replacement-native" -inherit autotools gettext pkgconfig pythonnative +inherit autotools gettext pkgconfig python3native +export PYTHON_ABI # OE-core patches autoreconf to additionally run gnu-configize, which fails with this recipe EXTRA_AUTORECONF_append = " --exclude=gnu-configize" @@ -102,9 +104,9 @@ FILES_${PN} += "${libdir}/rpm-plugins/*.so \ FILES_${PN}-dev += "${libdir}/rpm-plugins/*.la \ " -PACKAGES += "python-rpm" -PROVIDES += "python-rpm" -FILES_python-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*" +PACKAGES += "python3-rpm" +PROVIDES += "python3-rpm" +FILES_python3-rpm = "${PYTHON_SITEPACKAGES_DIR}/rpm/*" # rpm 5.x was packaging the rpm build tools separately RPROVIDES_${PN} += "rpm-build" -- cgit 1.2.3-korg