mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-29 22:28:08 -07:00
dev-python/lxml: disable broken test-case, EAPI bump
There is a test-case not working because of issues in libxml2. The patch disables the one broken test-case until upstream can fix it. Upstream bug: https://bugs.launchpad.net/lxml/+bug/1608479 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=592860 Package-Manager: portage-2.3.0 Closes: https://github.com/gentoo/gentoo/pull/2539 Signed-off-by: David Seifert <soap@gentoo.org>
This commit is contained in:
committed by
David Seifert
parent
e078b24162
commit
6ea4f1214d
@@ -2,9 +2,9 @@
|
||||
# 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
|
||||
|
||||
@@ -25,25 +25,29 @@ DEPEND="${RDEPEND}
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? ( dev-python/cssselect[${PYTHON_USEDEP}] )
|
||||
"
|
||||
# lxml tarball contains files pregenerated by Cython.
|
||||
|
||||
DISTUTILS_IN_SOURCE_BUILD=1
|
||||
|
||||
python_prepare_all() {
|
||||
epatch "${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.
|
||||
sed -i '/sys\.path/d' test.py || die
|
||||
|
||||
# seems to be broken
|
||||
rm src/lxml/tests/test_elementpath.py || die
|
||||
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_compile() {
|
||||
if [[ ${EPYTHON} != python3* ]]; then
|
||||
local CFLAGS=${CFLAGS}
|
||||
local -x CFLAGS="${CFLAGS}"
|
||||
append-cflags -fno-strict-aliasing
|
||||
fi
|
||||
tc-export PKG_CONFIG
|
||||
@@ -55,11 +59,7 @@ python_test() {
|
||||
cp -r -l src/lxml/html/tests "${BUILD_DIR}"/lib/lxml/html/ || die
|
||||
ln -s "${S}"/doc "${BUILD_DIR}"/ || die
|
||||
|
||||
local test
|
||||
for test in test.py selftest.py selftest2.py; do
|
||||
einfo "Running ${test}"
|
||||
"${PYTHON}" ${test} -vv -p || die "Test ${test} fails with ${EPYTHON}"
|
||||
done
|
||||
"${EPYTHON}" test.py -vv --all-levels -p || die "Test ${test} fails with ${EPYTHON}"
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
@@ -67,7 +67,10 @@ 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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user