summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2017-09-17 22:17:28 -0400
committerTim Harder <radhermit@gentoo.org>2017-09-17 22:33:44 -0400
commit154be19ceef915404eed3bba08f896f47510295e (patch)
treec9b45915c4054879df6e7b6242b287997bb07f28
parentdev-perl/Inline-C: Cleanup old re bug #617002 (diff)
downloadgentoo-154be19ceef915404eed3bba08f896f47510295e.tar.gz
gentoo-154be19ceef915404eed3bba08f896f47510295e.tar.bz2
gentoo-154be19ceef915404eed3bba08f896f47510295e.zip
dev-python/lxml: version bump to 4.0.0
-rw-r--r--dev-python/lxml/Manifest1
-rw-r--r--dev-python/lxml/lxml-4.0.0.ebuild80
2 files changed, 81 insertions, 0 deletions
diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
index 3e480efa7adb..7a9b007d822b 100644
--- a/dev-python/lxml/Manifest
+++ b/dev-python/lxml/Manifest
@@ -1,2 +1,3 @@
DIST lxml-3.7.3.tar.gz 3797713 SHA256 aa502d78a51ee7d127b4824ff96500f0181d3c7826e6ee7b800d068be79361c7 SHA512 9bf1142e81b6e1c8a47e296774d7e448d9ed47de3672f7442cc33274b07252baa47a9346efa9d2fda7b7bb66beb95bbc81f0ae16c9f808ff568f330991dd6d13 WHIRLPOOL d3881f308622ed8beb03a59bbf8256a55b92f5cf41c2c9a0c65c1e53acceea33ab93f420151330b09e8dbde3f717d5c095aa0275406355ec4a17105de46b6bae
DIST lxml-3.8.0.tar.gz 3795205 SHA256 736f72be15caad8116891eb6aa4a078b590d231fdc63818c40c21624ac71db96 SHA512 08f6f352e22ed2bc199a5f34a1c6b5f7b41ec282dc0026c9f16a06466c27e39e8eb18608ba4493636170eeac4b0194f7050445e1cc9bd0a4628573c404593088 WHIRLPOOL b09d7509ca55df74c5ced03ca91b72e0f373df6cb22331a452a35cfe3aa305bb9417280ae0b4835cd4abd29f7df465468799fa25c1b8d732152222c74fee51e1
+DIST lxml-4.0.0.tar.gz 4217301 SHA256 f7bc9f702500e205b1560d620f14015fec76dcd6f9e889a946a2ddcc3c344fd0 SHA512 8aa85ab6a99097ae2eaa0087b3a663aae8ac81a0a4d685bf857571c811c8ccd6410afc414f14c68702a53e90265726af085d0609ec7f0d3cc96e3702772627e8 WHIRLPOOL 24ad26d075ecf8f7062a6aa695557628664ce9d23cee7f66218bc373c90feec07bdf8a7f6e4501b996bd4bb208ca173faac1609262c08c6313f5a2d155eed220
diff --git a/dev-python/lxml/lxml-4.0.0.ebuild b/dev-python/lxml/lxml-4.0.0.ebuild
new file mode 100644
index 000000000000..2ab0055cd819
--- /dev/null
+++ b/dev-python/lxml/lxml-4.0.0.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit distutils-r1 eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="A Pythonic binding for the libxml2 and libxslt libraries"
+HOMEPAGE="http://lxml.de/ https://pypi.python.org/pypi/lxml/ https://github.com/lxml/lxml"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD ElementTree GPL-2 PSF-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc examples +threads test"
+
+# Note: lib{xml2,xslt} are used as C libraries, not Python modules.
+RDEPEND="
+ >=dev-libs/libxml2-2.9.2
+ >=dev-libs/libxslt-1.1.28"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? ( dev-python/cssselect[${PYTHON_USEDEP}] )
+ "
+
+DISTUTILS_IN_SOURCE_BUILD=1
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.5.0-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
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile() {
+ if [[ ${EPYTHON} != python3* ]]; then
+ local -x CFLAGS="${CFLAGS}"
+ append-cflags -fno-strict-aliasing
+ fi
+ tc-export PKG_CONFIG
+ distutils-r1_python_compile
+}
+
+python_test() {
+ cp -r -l src/lxml/tests "${BUILD_DIR}"/lib/lxml/ || die
+ cp -r -l src/lxml/html/tests "${BUILD_DIR}"/lib/lxml/html/ || die
+ ln -s "${S}"/doc "${BUILD_DIR}"/ || die
+
+ "${EPYTHON}" test.py -vv --all-levels -p || die "Test ${test} fails with ${EPYTHON}"
+}
+
+python_install_all() {
+ if use doc; then
+ local DOCS=( *.txt doc/*.txt )
+ local HTML_DOCS=( doc/html/. )
+ fi
+ if use examples; then
+ docinto examples
+ dodoc -r samples/.
+ fi
+
+ distutils-r1_python_install_all
+}
+
+pkg_postinst() {
+ optfeature "Support for BeautifulSoup3 as a parser backend" dev-python/beautifulsoup
+ optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect
+}