Gentoo Archives: gentoo-commits

From: Virgil Dupras <vdupras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/
Date: Sat, 15 Sep 2018 18:51:53
Message-Id: 1537037467.fde12615bf26cc02c8de0f3336f342036b30d1a3.vdupras@gentoo
1 commit: fde12615bf26cc02c8de0f3336f342036b30d1a3
2 Author: Virgil Dupras <vdupras <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 15 18:46:04 2018 +0000
4 Commit: Virgil Dupras <vdupras <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 15 18:51:07 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fde12615
7
8 dev-python/lxml: bump to 4.2.5
9
10 Package-Manager: Portage-2.3.49, Repoman-2.3.10
11
12 dev-python/lxml/Manifest | 1 +
13 dev-python/lxml/lxml-4.2.5.ebuild | 82 +++++++++++++++++++++++++++++++++++++++
14 2 files changed, 83 insertions(+)
15
16 diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
17 index 34dda934011..90d238089a0 100644
18 --- a/dev-python/lxml/Manifest
19 +++ b/dev-python/lxml/Manifest
20 @@ -2,3 +2,4 @@ DIST lxml-3.8.0.tar.gz 3795205 BLAKE2B 39f3edc7efe48bd569b636de89cfcd8f7e4e88e02
21 DIST lxml-4.1.1.tar.gz 2380804 BLAKE2B 4d3c4ef0472c7af7bb4185142a8274b596dd55a908d41f5295d0a78031a7efb3aef8893ca739f8db0675e44d4b0c346746a2758d31a54825c06a153203599ab9 SHA512 9542e5206f9b2f9e072c52ef8e6cf44d1aaae8ae3e7ca7e820c1fac12e716503308ccb3cebc52155b4c93799f3ebca247781fc491524d004378bd26f5cddb9d1
22 DIST lxml-4.2.0.tar.gz 4282112 BLAKE2B 5dd68d984097253fac4c35d59e7b687fa1bc0699946accb66687b94e0b3d807c7c555795486828307ccbadd87aa989b6bba2d2fc71cec27e8b8e52f2762c5548 SHA512 89c7dd5d36e8816008b22b25bb02275a008fcfe26f6fdeff139ac8394bd773035bf423b9d7c4233f19985e5a8c12f936b71096c55e28957e97da0810d88de8d3
23 DIST lxml-4.2.2.tar.gz 4417798 BLAKE2B 9344e0d261d2d40d43e67d4f162ce7da466c924dc1ad69d7eca602c14d789c6531747079cc92058e28f320c8695a64333b5044d37fecb8c713b0feac97ecef90 SHA512 4723c70edfa97069cb476d30e4f9c97f77c560302bdb547b6c4b0e7eb8610dc28a5e47c99bba6d780fd7b1510c0daa5cfb2da40542aab4415ea59c2a378a6b71
24 +DIST lxml-4.2.5.tar.gz 4414081 BLAKE2B c1c75a0a0c33011e2becb729de2c15dd786dd12bddeba4f2f26032d0d17104f258b471f5f961cbf96340df66cbce3e874d7a16c59731af280a309132b669d1b9 SHA512 4cf336d3e1471e8a26492760a143881517d12eb1c2dad82f8786540471bfabd68f8c795d97b7362166418c2be3c7996816638fdbd5a594536b9981478b90fdfe
25
26 diff --git a/dev-python/lxml/lxml-4.2.5.ebuild b/dev-python/lxml/lxml-4.2.5.ebuild
27 new file mode 100644
28 index 00000000000..4d4460e6ae4
29 --- /dev/null
30 +++ b/dev-python/lxml/lxml-4.2.5.ebuild
31 @@ -0,0 +1,82 @@
32 +# Copyright 1999-2018 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} pypy )
38 +
39 +inherit distutils-r1 eutils toolchain-funcs
40 +
41 +DESCRIPTION="A Pythonic binding for the libxml2 and libxslt libraries"
42 +HOMEPAGE="https://lxml.de/ https://pypi.org/project/lxml/ https://github.com/lxml/lxml"
43 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
44 +
45 +LICENSE="BSD ElementTree GPL-2 PSF-2"
46 +SLOT="0"
47 +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"
48 +IUSE="doc examples +threads test"
49 +
50 +# Note: lib{xml2,xslt} are used as C libraries, not Python modules.
51 +RDEPEND="
52 + >=dev-libs/libxml2-2.9.5
53 + >=dev-libs/libxslt-1.1.28"
54 +DEPEND="${RDEPEND}"
55 +BDEPEND="
56 + virtual/pkgconfig
57 + dev-python/setuptools[${PYTHON_USEDEP}]
58 + test? ( dev-python/cssselect[${PYTHON_USEDEP}] )
59 + "
60 +
61 +DISTUTILS_IN_SOURCE_BUILD=1
62 +
63 +PATCHES=(
64 + "${FILESDIR}"/${PN}-3.5.0-cross-compile.patch
65 +)
66 +
67 +python_prepare_all() {
68 + # avoid replacing PYTHONPATH in tests.
69 + sed -i -e '/sys\.path/d' test.py || die
70 +
71 + # apparently logs have changed with libxslt upgrade
72 + # https://bugs.launchpad.net/lxml/+bug/1782078
73 + sed -i -e '/assertEqual(4, len(log)/d' src/lxml/tests/test_threading.py || die
74 +
75 + # don't use some random SDK on Darwin
76 + sed -i -e '/_ldflags =/s/=.*isysroot.*darwin.*None/= None/' \
77 + setupinfo.py || die
78 +
79 + distutils-r1_python_prepare_all
80 +}
81 +
82 +python_compile() {
83 + if ! python_is_python3; then
84 + local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
85 + fi
86 + tc-export PKG_CONFIG
87 + distutils-r1_python_compile
88 +}
89 +
90 +python_test() {
91 + cp -r -l src/lxml/tests "${BUILD_DIR}"/lib/lxml/ || die
92 + cp -r -l src/lxml/html/tests "${BUILD_DIR}"/lib/lxml/html/ || die
93 + ln -s "${S}"/doc "${BUILD_DIR}"/ || die
94 +
95 + "${EPYTHON}" test.py -vv --all-levels -p || die "Test ${test} fails with ${EPYTHON}"
96 +}
97 +
98 +python_install_all() {
99 + if use doc; then
100 + local DOCS=( README.rst *.txt doc/*.txt )
101 + local HTML_DOCS=( doc/html/. )
102 + fi
103 + if use examples; then
104 + dodoc -r samples
105 + fi
106 +
107 + distutils-r1_python_install_all
108 +}
109 +
110 +pkg_postinst() {
111 + optfeature "Support for BeautifulSoup as a parser backend" dev-python/beautifulsoup
112 + optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect
113 +}