python libdir / site-packages path cleanup
cover python libdir / site-packages path cleanup
Utilize python-dir setting of am_cv_python_pythondir & am_cv_python_pyexecdir to proper paths to handle different libdir and multilib cases.
- k
PATCH 1/4 python-dir: specify am_cv_python_pythondir & am_cv_python_pyexecdir
autoconf will try and set these to via python.m4:
am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
However this is problematic as this doesnt respect libdir and where we've actually set python's site package dir to.
--- meta/classes/python-dir.bbclass | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
meta/classes/python-dir.bbclass +3 -0
@@ -1,3 +1,6 @@ PYTHON_BASEVERSION ?= "2.6" PYTHON_DIR = "python${PYTHON_BASEVERSION}" PYTHON_SITEPACKAGES_DIR = "${libdir}/${PYTHON_DIR}/site-packages" + +EXTRA_OECONF += "am_cv_python_pythondir=${PYTHON_SITEPACKAGES_DIR}" +EXTRA_OECONF += "am_cv_python_pyexecdir=${PYTHON_SITEPACKAGES_DIR}"
Signature · 1 line
1.7.3.4
PATCH 2/4 xcb-proto: use python-dir class for proper path setting
The previous patch to deal with multilib that patched aclocal doesn't work in all cases as we might regenerate aclocal and thus the modification is overwritten.
Instead we can utilize python-dir class to have it set:
am_cv_python_pythondir & am_cv_python_pyexecdir
for is to the proper path.
--- .../xcb/xcb-proto-1.6/aclocal.patch | 22 -------------------- meta/recipes-graphics/xcb/xcb-proto.inc | 5 +-- meta/recipes-graphics/xcb/xcb-proto_1.6.bb | 2 +- meta/recipes-graphics/xcb/xcb-proto_git.bb | 2 +- 4 files changed, 4 insertions(+), 27 deletions(-) delete mode 100644 meta/recipes-graphics/xcb/xcb-proto-1.6/aclocal.patch
meta/recipes-graphics/xcb/xcb-proto-1.6/aclocal.patch deleted +0 -22
@@ -1,22 +0,0 @@ -Upstream-Status: Inappropriate [configuration] - -diff -ruN xcb-proto-1.6-orig/aclocal.m4 xcb-proto-1.6/aclocal.m4 ---- xcb-proto-1.6-orig/aclocal.m4 2011-07-08 15:45:33.000000000 +0800 -+++ xcb-proto-1.6/aclocal.m4 2011-07-08 15:48:19.000000000 +0800 -@@ -518,6 +518,7 @@ - dnl general consensus is that you shouldn't need this ability. - - AC_SUBST([PYTHON_PREFIX], ['${prefix}']) -+ AC_SUBST([PYTHON_LIB_PREFIX], ['${libdir}']) - AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) - - dnl At times (like when building shared libraries) you may want -@@ -546,7 +547,7 @@ - am_py_prefix=$prefix - fi - am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null || -- echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` -+ echo "$PYTHON_LIB_PREFIX/python$PYTHON_VERSION/site-packages"` - case $am_cv_python_pythondir in - $am_py_prefix*) - am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
meta/recipes-graphics/xcb/xcb-proto.inc +2 -3
@@ -9,10 +9,9 @@ BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=XCB" SECTION = "x11/libs" LICENSE = "MIT-X" -SRC_URI = "http://xcb.freedesktop.org/dist/xcb-proto-${PV}.tar.bz2 \ - file://aclocal.patch" +SRC_URI = "http://xcb.freedesktop.org/dist/xcb-proto-${PV}.tar.bz2" -inherit autotools pkgconfig +inherit autotools pkgconfig python-dir PACKAGES += "python-xcbgen"
meta/recipes-graphics/xcb/xcb-proto_1.6.bb +1 -1
@@ -4,7 +4,7 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7 \ file://src/dri2.xml;beginline=2;endline=28;md5=f8763b13ff432e8597e0d610cf598e65" -PR = "r2" +PR = "r3" SRC_URI[md5sum] = "04313e1d914b44d0e457f6c494fc178b" SRC_URI[sha256sum] = "f52bc1159b12496f002404eb5793c01277b20c82cb72c5ff076d7b25da9b5ca2"
meta/recipes-graphics/xcb/xcb-proto_git.bb +1 -1
@@ -3,7 +3,7 @@ DEFAULT_PREFERENCE = "-1" include xcb-proto.inc SRCREV = "d81ca233e98be8fa59e8c90d262c0516944c5a66" PV = "1.2+gitr${SRCPV}" -PR = "r2" +PR = "r3" SRC_URI = "git://anongit.freedesktop.org/git/xcb/proto;protocol=git" S = "${WORKDIR}/git"
Signature · 1 line
1.7.3.4
PATCH 3/4 telepathy-python: utilize python-dir to respect libdir/site-packages path
Fixes issue of libdir is set to something like '/usr/lib64'.
--- .../telepathy/telepathy-python_0.15.19.bb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-connectivity/telepathy/telepathy-python_0.15.19.bb +2 -2
@@ -9,9 +9,9 @@ RDEPENDS_${PN} += "python-dbus" SRC_URI = "http://telepathy.freedesktop.org/releases/${BPN}/${BPN}-${PV}.tar.gz \ file://parallel_make.patch" -PR = "r2" +PR = "r3" -inherit autotools +inherit autotools python-dir SRC_URI[md5sum] = "f7ca25ab3c88874015b7e9728f7f3017" SRC_URI[sha256sum] = "244c0e1bf4bbd78ae298ea659fe10bf3a73738db550156767cc2477aedf72376"
Signature · 1 line
1.7.3.4
PATCH 4/4 gnome-doc-utils: respect python-dir setting EXTRA_OECONF
Don't just assign but append to EXTRA_OECONF so we maintain python-dir setting fo EXTRA_OECONF.
This fixes issue if libdir is set to something like '/usr/lib64'.
--- meta/recipes-gnome/gnome/gnome-doc-utils.inc | 2 +- meta/recipes-gnome/gnome/gnome-doc-utils_0.20.6.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-gnome/gnome/gnome-doc-utils.inc +1 -1
@@ -4,7 +4,7 @@ DEPENDS_virtclass-native = "libxml2-native libxslt-native intltool-native" inherit gnome gettext python-dir -EXTRA_OECONF = "--disable-scrollkeeper" +EXTRA_OECONF += "--disable-scrollkeeper" do_install_append() { mkdir -p ${D}${datadir}/xml/gnome/xslt/
meta/recipes-gnome/gnome/gnome-doc-utils_0.20.6.bb +1 -1
@@ -1,7 +1,7 @@ require gnome-doc-utils.inc LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=eb723b61539feef013de476e68b5c50a \ file://COPYING.LGPL;md5=a6f89e2100d9b6cdffcea4f398e37343" -PR = "r4" +PR = "r5" SRC_URI += "file://xsltproc_nonet.patch \ file://use-usr-bin-env-for-python-in-xml2po.patch"
Signature · 1 line
1.7.3.4