Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/
Date: Wed, 07 Aug 2019 15:42:01
Message-Id: 1565192514.4c7ab8c68c60fe91dc3d05be7db8774da9055f4d.mgorny@gentoo
1 commit: 4c7ab8c68c60fe91dc3d05be7db8774da9055f4d
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 7 13:22:05 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 7 15:41:54 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c7ab8c6
7
8 dev-python/lxml: Bump to 4.4.0
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/lxml/Manifest | 1 +
13 dev-python/lxml/lxml-4.4.0.ebuild | 80 +++++++++++++++++++++++++++++++++++++++
14 2 files changed, 81 insertions(+)
15
16 diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
17 index a5f3f80baef..2d5cc7cc0f3 100644
18 --- a/dev-python/lxml/Manifest
19 +++ b/dev-python/lxml/Manifest
20 @@ -1,3 +1,4 @@
21 DIST lxml-4.2.5.tar.gz 4414081 BLAKE2B c1c75a0a0c33011e2becb729de2c15dd786dd12bddeba4f2f26032d0d17104f258b471f5f961cbf96340df66cbce3e874d7a16c59731af280a309132b669d1b9 SHA512 4cf336d3e1471e8a26492760a143881517d12eb1c2dad82f8786540471bfabd68f8c795d97b7362166418c2be3c7996816638fdbd5a594536b9981478b90fdfe
22 DIST lxml-4.3.3.tar.gz 4378439 BLAKE2B 30c2a29e58951164fbff1c9d23362d46987c86b671e0cfa6cf15cbbb3db23ead856786babe57ce553f7b8a66d8ac333410ea1bb3b8b521aac43a038b90daf488 SHA512 cbc1cd30bac4b9ac845d99949c8c231a7870398f942695df5a00586d70d0f6b6ebd457a1a9306806af7d0fd521a14c54d266902943263927a0d940abc3cdf5c0
23 DIST lxml-4.3.4.tar.gz 2488557 BLAKE2B 5059ea45d3d833955636216a7c096322496882de4592a0d19604885dca8dffbc763afb7dc804b7a34561d0c94dfa2130a61835d6c12b97dc83008e8fa33e098a SHA512 7349cb4805e538da5b11edcb79fcd09ddedf0d52e50273a4e587f209e6b147b50737c45dcfc8eb3ee8e7be8f99769046f704c5fc8c35cee74d5d22ef72d503ed
24 +DIST lxml-4.4.0.tar.gz 939001 BLAKE2B 9fc473729286e98cd73e4b39d7acf22ccb957dd4b366924dc171a6c89c2e435a3dae771342eb3b143451b0550960cb821430de3e8f6470dc87e3a85efc389314 SHA512 23e7b5157a6520f3e1dab76b023e828a5afe9d0103e2d3ff8fd1a8791000ed8f859e26fe9809676b89d4ef9fa4b27a6f1662a2b0f54e5ae04776643f5b06c0c3
25
26 diff --git a/dev-python/lxml/lxml-4.4.0.ebuild b/dev-python/lxml/lxml-4.4.0.ebuild
27 new file mode 100644
28 index 00000000000..e7c16048171
29 --- /dev/null
30 +++ b/dev-python/lxml/lxml-4.4.0.ebuild
31 @@ -0,0 +1,80 @@
32 +# Copyright 1999-2019 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +PYTHON_COMPAT=( python2_7 python3_{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="https://github.com/lxml/lxml/archive/${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 ~riscv ~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 + $(python_gen_cond_dep 'dev-python/cython[${PYTHON_USEDEP}]' python2_7 'python3*')
58 + dev-python/setuptools[${PYTHON_USEDEP}]
59 + test? ( dev-python/cssselect[${PYTHON_USEDEP}] )
60 + "
61 +
62 +DISTUTILS_IN_SOURCE_BUILD=1
63 +S=${WORKDIR}/lxml-${P}
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 + # don't use some random SDK on Darwin
74 + sed -i -e '/_ldflags =/s/=.*isysroot.*darwin.*None/= None/' \
75 + setupinfo.py || die
76 +
77 + distutils-r1_python_prepare_all
78 +}
79 +
80 +python_compile() {
81 + if ! python_is_python3; then
82 + local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
83 + fi
84 + tc-export PKG_CONFIG
85 + distutils-r1_python_compile
86 +}
87 +
88 +python_test() {
89 + cp -r -l src/lxml/tests "${BUILD_DIR}"/lib/lxml/ || die
90 + cp -r -l src/lxml/html/tests "${BUILD_DIR}"/lib/lxml/html/ || die
91 + ln -s "${S}"/doc "${BUILD_DIR}"/ || die
92 +
93 + "${EPYTHON}" test.py -vv --all-levels -p || die "Test ${test} fails with ${EPYTHON}"
94 +}
95 +
96 +python_install_all() {
97 + if use doc; then
98 + local DOCS=( README.rst *.txt doc/*.txt )
99 + local HTML_DOCS=( doc/html/. )
100 + fi
101 + if use examples; then
102 + dodoc -r samples
103 + fi
104 +
105 + distutils-r1_python_install_all
106 +}
107 +
108 +pkg_postinst() {
109 + optfeature "Support for BeautifulSoup as a parser backend" dev-python/beautifulsoup
110 + optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect
111 +}