Skip to contentSkip to conversation

libxml2: fix python path and enable libxml2-python

PATCH Superseded Robert Yang 2 participants 8 messages Sep 9, 2014 – Sep 15, 2014

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover libxml2: fix python path and enable libxml2-python

* Tested on:
qemux86
qemux86-64
qemuarm
qemuppc
qemumips.

// Robert

The following changes since commit e72aac2ae9e5fce1715fa04b7e94034fd06892d9:

alsa-lib: libasound should runtime depends on alsa-conf (2014-09-03 11:30:11 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib rbt/libxml2
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/libxml2

Robert Yang (1):
libxml2: fix python path and enable libxml2-python

 meta/recipes-core/libxml/libxml2.inc |   17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 libxml2: fix python path and enable libxml2-python

We have libxml2-python for native and nativesdk, but don't have it for target, and can't find the reason from the git log, libxml2-python is widely used, after looked into it's configure.in, we can enable it easily.

The previous --with-python=${STAGING_BINDIR}/python is incorrect, it acted as work becase it's conigure can check automatically, python is in ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}, as known as ${PYTHON}.

---
 meta/recipes-core/libxml/libxml2.inc |   17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)
meta/recipes-core/libxml/libxml2.inc +7 -10
index bcf9a62..a252c61 100644
@@ -9,9 +9,7 @@ LIC_FILES_CHKSUM = "file://Copyright;md5=2044417e2e5006b65a8b9067b683fcf1 \
                     file://list.c;beginline=4;endline=13;md5=cdbfa3dee51c099edb04e39f762ee907 \
                     file://trio.c;beginline=5;endline=14;md5=6c025753c86d958722ec76e94cae932e"
 
-DEPENDS_class-nativesdk = "nativesdk-python"
-DEPENDS_class-native = "python-native"
-DEPENDS =+ "zlib"
+DEPENDS = "zlib python"
 
 SRC_URI = "ftp://xmlsoft.org/libxml2/libxml2-${PV}.tar.gz;name=libtar \
            file://libxml-64bit.patch \
@@ -31,20 +29,19 @@ RDEPENDS_${PN}-ptest += "python-core"
 
 RDEPENDS_${PN}-ptest_append_libc-glibc += "glibc-gconv-ebcdic-us glibc-gconv-ibm1141"
 
+RDEPENDS_${PN}-python += "python-core"
+
 # We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header
 do_configure_prepend () {
 	sed -i -e '/.*ansidecl.h.*/d' ${S}/configure.in
 }
 
-do_configure_prepend_class-nativesdk () {
-	# Ensure we get the correct site-packages path
-	export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
-}
+export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
 
 # WARNING: zlib is require for RPM use
-EXTRA_OECONF = "--without-python --without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
-EXTRA_OECONF_class-native = "--with-python=${STAGING_BINDIR}/python --without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
-EXTRA_OECONF_class-nativesdk = "--with-python=${STAGING_BINDIR}/python --without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
+EXTRA_OECONF = "--with-python=${PYTHON} --without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
+EXTRA_OECONF_class-native = "--with-python=${PYTHON} --without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
+EXTRA_OECONF_class-nativesdk = "--with-python=${PYTHON} --without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
 EXTRA_OECONF_linuxstdbase = "--without-python --with-debug --with-legacy --with-docbook --with-c14n --without-lzma --with-zlib"
 
 # required for pythong binding
Signature · 1 line
1.7.9.5
#2 lore raw
Quoted 4 lines · Robert Yang

We have libxml2-python for native and nativesdk, but don't have it for target, and can't find the reason from the git log, libxml2-python is widely used, after looked into it's configure.in, we can enable it easily.

It seems like adding a PACKAGECONFIG for Python would be a good idea, we don't want to force target Python to be built.

Ross

#3 lore raw
Quoted 8 lines · Ross
Quoted 4 lines · Robert Yang

We have libxml2-python for native and nativesdk, but don't have it for target, and can't find the reason from the git log, libxml2-python is widely used, after looked into it's configure.in, we can enable it easily.

It seems like adding a PACKAGECONFIG for Python would be a good idea, we don't want to force target Python to be built.

Thanks, updated in the repo:

git://git.openembedded.org/openembedded-core-contrib rbt/libxml2

commit ff4a9f5118f39d82fe1bb7fcc7870ef01a9cdb0b

Author: Robert Yang <[email protected]>
Date:   Mon Sep 8 20:24:38 2014 -0700

libxml2: fix python path and add libxml2-python

We have libxml2-python for native and nativesdk, but don't have it for target, and can't find the reason from the git log, libxml2-python is widely used, after looked into it's configure.in, we can add it by PACKAGECONFIG.

The previous --with-python=${STAGING_BINDIR}/python is incorrect, it acted as work becase it's conigure can check automatically, python is in ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}, as known as ${PYTHON}.

meta/recipes-core/libxml/libxml2.inc +6 -8
index bcf9a62..4d11c2b 100644
@@ -36,15 +36,14 @@ do_configure_prepend () {
        sed -i -e '/.*ansidecl.h.*/d' ${S}/configure.in
 }
 
-do_configure_prepend_class-nativesdk () {
-       # Ensure we get the correct site-packages path
-       export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
-}
+export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
 
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python,python-core"
 # WARNING: zlib is require for RPM use
-EXTRA_OECONF = "--without-python --without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
-EXTRA_OECONF_class-native = "--with-python=${STAGING_BINDIR}/python --without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
-EXTRA_OECONF_class-nativesdk = "--with-python=${STAGING_BINDIR}/python --without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
+EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
+EXTRA_OECONF_class-native = "--with-python=${PYTHON} --without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
+EXTRA_OECONF_class-nativesdk = "--with-python=${PYTHON} --without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
 EXTRA_OECONF_linuxstdbase = "--without-python --with-debug --with-legacy 
--with-docbook --with-c14n --without-lzma --with-zlib"
 
 # required for pythong binding

// Robert

Quoted 4 lines

Ross

#4 lore raw

Review

Quoted 4 lines · Robert Yang
(quoted diff) +3 -1
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[python] =
+EXTRA_OECONF_class-native = "--with-python=${PYTHON} --without-legacy
--without-docbook --with-c14n --without-lzma --with-zlib"

You should remove the python arguments from all overrides of EXTRA_OECONF and instead have PACKAGECONFIG overrides to add them back. With this patch, native builds are passed --without-python --with-python (one from EXTRA_OECONF, one from the disabled PACKAGECONFIG).

Ross

#5 lore raw
Quoted 11 lines · Ross

Review

Quoted 4 lines · Robert Yang
(quoted diff) +3 -1
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[python] =
+EXTRA_OECONF_class-native = "--with-python=${PYTHON} --without-legacy
--without-docbook --with-c14n --without-lzma --with-zlib"

You should remove the python arguments from all overrides of EXTRA_OECONF and instead have PACKAGECONFIG overrides to add them back. With this patch, native builds are passed --without-python --with-python (one from EXTRA_OECONF, one from the disabled PACKAGECONFIG).

Ah, yes, then we should set PACKAGECONFIG ??= "python" by default ? Otherwise I'm afraid that there would be errors.

// Robert

Quoted 4 lines

Ross

#6 lore raw
Quoted 3 lines · Robert Yang

Ah, yes, then we should set PACKAGECONFIG ??= "python" by default ? Otherwise
I'm afraid that there would be errors.

No need to set it by default - although my argument here is that we don't currently. This should work:

PACKAGECONFIG ??= ""
PACKAGECONFIG_class-native ??= "python"
PACKAGECONFIG_class-nativesdk ??= "python"

Ross

#7 lore raw
Quoted 11 lines · Ross
Quoted 3 lines · Robert Yang

Ah, yes, then we should set PACKAGECONFIG ??= "python" by default ? Otherwise
I'm afraid that there would be errors.

No need to set it by default - although my argument here is that we don't currently. This should work:

PACKAGECONFIG ??= ""
PACKAGECONFIG_class-native ??= "python"
PACKAGECONFIG_class-nativesdk ??= "python"

Thanks, I will update it after testing, I think that also this:

PACKAGECONFIG__linuxstdbase ??= ""

// Robert

Quoted 4 lines

Ross