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