python-lxml: allow build as host package

While currently there is no in-tree Buildroot package which depends on
host-python-lxml, we (DATACOM) have some proprietary modules that use it
in their test scripts.

We tested python-lxml as host package and confirmed that it builds and
works correctly. Someone else might require it, so we are proposing its
inclusion.

Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
[Thomas: add Config.in.host entry.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
Carlos Santos 2017-02-01 15:51:08 -02:00 committed by Thomas Petazzoni
parent 95ba0bb7e8
commit 4f147ae0a0
3 changed files with 14 additions and 0 deletions

View file

@ -36,6 +36,7 @@ menu "Host utilities"
source "package/patchelf/Config.in.host"
source "package/pru-software-support/Config.in.host"
source "package/pwgen/Config.in.host"
source "package/python-lxml/Config.in.host"
source "package/qemu/Config.in.host"
source "package/raspberrypi-usbboot/Config.in.host"
source "package/s6-rc/Config.in.host"

View file

@ -0,0 +1,8 @@
config BR2_PACKAGE_HOST_PYTHON_LXML
bool "host python-lxml"
help
The lxml XML toolkit is a Pythonic binding for the C libraries
libxml2 and libxslt.
http://lxml.de/

View file

@ -21,11 +21,16 @@ PYTHON_LXML_LICENSE_FILES = \
PYTHON_LXML_SETUP_TYPE = setuptools
PYTHON_LXML_DEPENDENCIES = libxml2 libxslt zlib
HOST_PYTHON_LXML_DEPENDENCIES = host-libxml2 host-libxslt host-zlib
# python-lxml needs these scripts in order to properly detect libxml2 and
# libxslt compiler and linker flags
PYTHON_LXML_BUILD_OPTS = \
--with-xslt-config=$(STAGING_DIR)/usr/bin/xslt-config \
--with-xml2-config=$(STAGING_DIR)/usr/bin/xml2-config
HOST_PYTHON_LXML_BUILD_OPTS = \
--with-xslt-config=$(HOST_DIR)/usr/bin/xslt-config \
--with-xml2-config=$(HOST_DIR)/usr/bin/xml2-config
$(eval $(python-package))
$(eval $(host-python-package))