diff options
author | Virgil Dupras <vdupras@gentoo.org> | 2019-01-07 15:34:53 -0500 |
---|---|---|
committer | Virgil Dupras <vdupras@gentoo.org> | 2019-01-07 15:34:53 -0500 |
commit | 816594f172dba98c987574a3c188f33047d56446 (patch) | |
tree | 627da3c7324dd6dc44c009afedda8437c2cf0364 /dev-python/lxml | |
parent | app-text/poppler: Drop 0.67.0 (diff) | |
download | gentoo-816594f172dba98c987574a3c188f33047d56446.tar.gz gentoo-816594f172dba98c987574a3c188f33047d56446.tar.bz2 gentoo-816594f172dba98c987574a3c188f33047d56446.zip |
dev-python/lxml: bump to 4.3.0
Signed-off-by: Virgil Dupras <vdupras@gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
Diffstat (limited to 'dev-python/lxml')
-rw-r--r-- | dev-python/lxml/Manifest | 1 | ||||
-rw-r--r-- | dev-python/lxml/lxml-4.3.0.ebuild | 83 |
2 files changed, 84 insertions, 0 deletions
diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest index f8774880e1bb..6eedd3b84dc0 100644 --- a/dev-python/lxml/Manifest +++ b/dev-python/lxml/Manifest @@ -1,3 +1,4 @@ DIST lxml-4.1.1.tar.gz 2380804 BLAKE2B 4d3c4ef0472c7af7bb4185142a8274b596dd55a908d41f5295d0a78031a7efb3aef8893ca739f8db0675e44d4b0c346746a2758d31a54825c06a153203599ab9 SHA512 9542e5206f9b2f9e072c52ef8e6cf44d1aaae8ae3e7ca7e820c1fac12e716503308ccb3cebc52155b4c93799f3ebca247781fc491524d004378bd26f5cddb9d1 DIST lxml-4.2.5.tar.gz 4414081 BLAKE2B c1c75a0a0c33011e2becb729de2c15dd786dd12bddeba4f2f26032d0d17104f258b471f5f961cbf96340df66cbce3e874d7a16c59731af280a309132b669d1b9 SHA512 4cf336d3e1471e8a26492760a143881517d12eb1c2dad82f8786540471bfabd68f8c795d97b7362166418c2be3c7996816638fdbd5a594536b9981478b90fdfe DIST lxml-4.2.6.tar.gz 2398161 BLAKE2B 3849a0a570b190a33bfb183507f81e106a1ab30352d959fdf5989c671d6f63f7286163bac3d141f80d34c43c4afef229145ba24da110f28b0ea279d050d9758e SHA512 40ef47f8a647a299bad5ff9500ebfad057be7707287d271a6310e66169f598bd1248e5702a5dcda6b93c87775f25596c502fe9ab804bf9157bfcae977cfb5f43 +DIST lxml-4.3.0.tar.gz 2483162 BLAKE2B 3f3646a47a0344af22bfb567a0985a27e8a46051850e99b5e82d0bc59c94c0e9b19ca93cf6d5d790599e81c9513686c3462ad6544ad658d0efd77ad431b07014 SHA512 49d122c8a6dafe50195bc8cfb3ea52780054a57762132c000cd976fdbdbabaab6bc8b95b77d124ae144f33c24d71793a2debbebf789d5ca866734a984edac8bb diff --git a/dev-python/lxml/lxml-4.3.0.ebuild b/dev-python/lxml/lxml-4.3.0.ebuild new file mode 100644 index 000000000000..38415295fbb3 --- /dev/null +++ b/dev-python/lxml/lxml-4.3.0.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} pypy ) + +inherit distutils-r1 eutils toolchain-funcs + +DESCRIPTION="A Pythonic binding for the libxml2 and libxslt libraries" +HOMEPAGE="https://lxml.de/ https://pypi.org/project/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.5 + >=dev-libs/libxslt-1.1.28" +DEPEND="${RDEPEND}" +BDEPEND=" + virtual/pkgconfig + $(python_gen_cond_dep 'dev-python/cython[${PYTHON_USEDEP}]' python2_7 'python3*') + 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 +) + +python_prepare_all() { + # avoid replacing PYTHONPATH in tests. + sed -i -e '/sys\.path/d' test.py || die + + # apparently logs have changed with libxslt upgrade + # https://bugs.launchpad.net/lxml/+bug/1782078 + sed -i -e '/assertEqual(4, len(log)/d' src/lxml/tests/test_threading.py || die + + # don't use some random SDK on Darwin + sed -i -e '/_ldflags =/s/=.*isysroot.*darwin.*None/= None/' \ + setupinfo.py || die + + distutils-r1_python_prepare_all +} + +python_compile() { + if ! python_is_python3; then + local -x CFLAGS="${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=( README.rst *.txt doc/*.txt ) + local HTML_DOCS=( doc/html/. ) + fi + if use examples; then + dodoc -r samples + fi + + distutils-r1_python_install_all +} + +pkg_postinst() { + optfeature "Support for BeautifulSoup as a parser backend" dev-python/beautifulsoup + optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect +} |