1 |
commit: 4ed07b1eedac46f76f201e9c995fc790c801b0d3 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 21 14:29:50 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 21 14:32:01 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ed07b1e |
7 |
|
8 |
dev-python/lxml: Bump to 4.2.0 |
9 |
|
10 |
dev-python/lxml/Manifest | 1 + |
11 |
dev-python/lxml/lxml-4.2.0.ebuild | 72 +++++++++++++++++++++++++++++++++++++++ |
12 |
2 files changed, 73 insertions(+) |
13 |
|
14 |
diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest |
15 |
index 2f9a639b1f2..81e1b2a32f3 100644 |
16 |
--- a/dev-python/lxml/Manifest |
17 |
+++ b/dev-python/lxml/Manifest |
18 |
@@ -1,2 +1,3 @@ |
19 |
DIST lxml-3.8.0.tar.gz 3795205 BLAKE2B 39f3edc7efe48bd569b636de89cfcd8f7e4e88e025fd5c21164e35edf110546112844a4ddb6cb1842649fb165de3b3880b0fdb7a23522a891b35390adf64c95b SHA512 08f6f352e22ed2bc199a5f34a1c6b5f7b41ec282dc0026c9f16a06466c27e39e8eb18608ba4493636170eeac4b0194f7050445e1cc9bd0a4628573c404593088 |
20 |
DIST lxml-4.1.1.tar.gz 2380804 BLAKE2B 4d3c4ef0472c7af7bb4185142a8274b596dd55a908d41f5295d0a78031a7efb3aef8893ca739f8db0675e44d4b0c346746a2758d31a54825c06a153203599ab9 SHA512 9542e5206f9b2f9e072c52ef8e6cf44d1aaae8ae3e7ca7e820c1fac12e716503308ccb3cebc52155b4c93799f3ebca247781fc491524d004378bd26f5cddb9d1 |
21 |
+DIST lxml-4.2.0.tar.gz 4282112 BLAKE2B 5dd68d984097253fac4c35d59e7b687fa1bc0699946accb66687b94e0b3d807c7c555795486828307ccbadd87aa989b6bba2d2fc71cec27e8b8e52f2762c5548 SHA512 89c7dd5d36e8816008b22b25bb02275a008fcfe26f6fdeff139ac8394bd773035bf423b9d7c4233f19985e5a8c12f936b71096c55e28957e97da0810d88de8d3 |
22 |
|
23 |
diff --git a/dev-python/lxml/lxml-4.2.0.ebuild b/dev-python/lxml/lxml-4.2.0.ebuild |
24 |
new file mode 100644 |
25 |
index 00000000000..83ea4f6e4d8 |
26 |
--- /dev/null |
27 |
+++ b/dev-python/lxml/lxml-4.2.0.ebuild |
28 |
@@ -0,0 +1,72 @@ |
29 |
+# Copyright 1999-2018 Gentoo Foundation |
30 |
+# Distributed under the terms of the GNU General Public License v2 |
31 |
+ |
32 |
+EAPI=6 |
33 |
+ |
34 |
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy ) |
35 |
+ |
36 |
+inherit distutils-r1 eutils toolchain-funcs |
37 |
+ |
38 |
+DESCRIPTION="A Pythonic binding for the libxml2 and libxslt libraries" |
39 |
+HOMEPAGE="http://lxml.de/ https://pypi.python.org/pypi/lxml/ https://github.com/lxml/lxml" |
40 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
41 |
+ |
42 |
+LICENSE="BSD ElementTree GPL-2 PSF-2" |
43 |
+SLOT="0" |
44 |
+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" |
45 |
+IUSE="doc examples +threads test" |
46 |
+ |
47 |
+# Note: lib{xml2,xslt} are used as C libraries, not Python modules. |
48 |
+RDEPEND=" |
49 |
+ >=dev-libs/libxml2-2.9.5 |
50 |
+ >=dev-libs/libxslt-1.1.28" |
51 |
+DEPEND="${RDEPEND} |
52 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
53 |
+ test? ( dev-python/cssselect[${PYTHON_USEDEP}] ) |
54 |
+ " |
55 |
+ |
56 |
+DISTUTILS_IN_SOURCE_BUILD=1 |
57 |
+ |
58 |
+PATCHES=( |
59 |
+ "${FILESDIR}"/${PN}-3.5.0-cross-compile.patch |
60 |
+) |
61 |
+ |
62 |
+python_prepare_all() { |
63 |
+ # avoid replacing PYTHONPATH in tests. |
64 |
+ sed -i '/sys\.path/d' test.py || die |
65 |
+ |
66 |
+ distutils-r1_python_prepare_all |
67 |
+} |
68 |
+ |
69 |
+python_compile() { |
70 |
+ if ! python_is_python3; then |
71 |
+ local -x CFLAGS="${CFLAGS} -fno-strict-aliasing" |
72 |
+ fi |
73 |
+ tc-export PKG_CONFIG |
74 |
+ distutils-r1_python_compile |
75 |
+} |
76 |
+ |
77 |
+python_test() { |
78 |
+ cp -r -l src/lxml/tests "${BUILD_DIR}"/lib/lxml/ || die |
79 |
+ cp -r -l src/lxml/html/tests "${BUILD_DIR}"/lib/lxml/html/ || die |
80 |
+ ln -s "${S}"/doc "${BUILD_DIR}"/ || die |
81 |
+ |
82 |
+ "${EPYTHON}" test.py -vv --all-levels -p || die "Test ${test} fails with ${EPYTHON}" |
83 |
+} |
84 |
+ |
85 |
+python_install_all() { |
86 |
+ if use doc; then |
87 |
+ local DOCS=( README.rst *.txt doc/*.txt ) |
88 |
+ local HTML_DOCS=( doc/html/. ) |
89 |
+ fi |
90 |
+ if use examples; then |
91 |
+ dodoc -r samples |
92 |
+ fi |
93 |
+ |
94 |
+ distutils-r1_python_install_all |
95 |
+} |
96 |
+ |
97 |
+pkg_postinst() { |
98 |
+ optfeature "Support for BeautifulSoup3 as a parser backend" dev-python/beautifulsoup |
99 |
+ optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect |
100 |
+} |