# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI=5
+EAPI=6
-PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
+PYTHON_COMPAT=( python2_7 python3_{4,5} )
inherit distutils-r1 eutils flag-o-matic toolchain-funcs
DISTUTILS_IN_SOURCE_BUILD=1
-PATCHES=( "${FILESDIR}"/${P}-cross-compile.patch )
+PATCHES=(
+ "${FILESDIR}"/${P}-cross-compile.patch
+
+ # This patch removes a testcase that fails because of issues
+ # in libxml2.
+ #
+ # Upstream bug: https://bugs.launchpad.net/lxml/+bug/1608479
+ "${FILESDIR}"/${PN}-3.6.4-fix-test_xmlschema.patch
+)
python_prepare_all() {
# avoid replacing PYTHONPATH in tests.
python_compile() {
if [[ ${EPYTHON} != python3* ]]; then
- local CFLAGS=${CFLAGS}
+ local -x CFLAGS="${CFLAGS}"
append-cflags -fno-strict-aliasing
fi
tc-export PKG_CONFIG
cp -r -l src/lxml/html/tests "${BUILD_DIR}"/lib/lxml/html/ || die
ln -s "${S}"/doc "${BUILD_DIR}"/ || die
- "${PYTHON}" test.py -vv --all-levels -p || die "Test ${test} fails with ${EPYTHON}"
+ "${EPYTHON}" test.py -vv --all-levels -p || die "Test ${test} fails with ${EPYTHON}"
}
python_install_all() {
local DOCS=( *.txt doc/*.txt )
local HTML_DOCS=( doc/html/. )
fi
- use examples && local EXAMPLES=( samples/. )
+ if use examples; then
+ docinto examples
+ dodoc -r samples/.
+ fi
distutils-r1_python_install_all
}