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: Sat, 02 Jul 2022 04:47:18
Message-Id: 1656737208.b93e546746f6b60c5efe97ad6d98636547c3b797.mgorny@gentoo
1 commit: b93e546746f6b60c5efe97ad6d98636547c3b797
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 2 03:17:11 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 2 04:46:48 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b93e5467
7
8 dev-python/lxml: Bump to 4.9.1
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.9.1.ebuild | 108 ++++++++++++++++++++++++++++++++++++++
14 2 files changed, 109 insertions(+)
15
16 diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
17 index 074412d4bb7e..c3b7f271d87b 100644
18 --- a/dev-python/lxml/Manifest
19 +++ b/dev-python/lxml/Manifest
20 @@ -1,2 +1,3 @@
21 DIST lxml-4.8.0.tar.gz 959376 BLAKE2B a40be5e058153e1dc3f8501b645b0211f4498928ed71b161df54a67501356e9968064401b6d17e17dc8d62223b29e794eaa2bee7ff78ffee203d9f9a22f3e1c2 SHA512 bbcd8ea001cfa2820dcac4e00de6ded81700b2f0bd4a58bcdd4da05a19a107f57cd56280c4838fe19ee7ecd6be105878bf8c2f1c0e5111899c4ad1a2ba03537f
22 DIST lxml-4.9.0.gh.tar.gz 960537 BLAKE2B c1ffa82f74ae1876c39d94fe248ab0278d30b805081fef92b9cc9ccf28dc10d239a3ee1861a5603deda1f1ae2c4eb288a66019281010459f6320b1000bea1955 SHA512 fb88b2e9d92972de69c1f8b54529ea00364b8b72475a2a88c9c509e4fb8cfbf0ced1bc093f96ae60c1d275ee9a8e5a5d2f51472ecce3d706a1cb1299789f9495
23 +DIST lxml-4.9.1.gh.tar.gz 960663 BLAKE2B bb464757f9188a76661732d237f3b0f9010f51dd9c5426b578ca8fdb486d28fcfec81d4dd817b2fa0601ed9d7890e01ce71e4ea4c842b92e59dd5437200bad22 SHA512 f52d54908f92997f610638a9a3054cb73723ae81a5ad9e77918b0603ec7441b0e7d2143f8a8ac66c05cd6a0b3b298d348397b7e2df19f83c21e336514c47d910
24
25 diff --git a/dev-python/lxml/lxml-4.9.1.ebuild b/dev-python/lxml/lxml-4.9.1.ebuild
26 new file mode 100644
27 index 000000000000..230896cacca2
28 --- /dev/null
29 +++ b/dev-python/lxml/lxml-4.9.1.ebuild
30 @@ -0,0 +1,108 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +DISTUTILS_USE_PEP517=setuptools
37 +PYTHON_COMPAT=( python3_{8..11} pypy3 )
38 +
39 +inherit distutils-r1 optfeature toolchain-funcs
40 +
41 +DESCRIPTION="A Pythonic binding for the libxml2 and libxslt libraries"
42 +HOMEPAGE="
43 + https://lxml.de/
44 + https://pypi.org/project/lxml/
45 + https://github.com/lxml/lxml
46 +"
47 +SRC_URI="https://github.com/lxml/lxml/archive/${P}.tar.gz -> ${P}.gh.tar.gz"
48 +S="${WORKDIR}"/lxml-${P}
49 +
50 +LICENSE="BSD ElementTree GPL-2 PSF-2"
51 +SLOT="0"
52 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
53 +IUSE="doc examples +threads test"
54 +RESTRICT="!test? ( test )"
55 +
56 +# Note: lib{xml2,xslt} are used as C libraries, not Python modules.
57 +DEPEND="
58 + >=dev-libs/libxml2-2.9.12-r2
59 + >=dev-libs/libxslt-1.1.28"
60 +RDEPEND="
61 + ${DEPEND}
62 +"
63 +BDEPEND="
64 + virtual/pkgconfig
65 + >=dev-python/cython-0.29.29[${PYTHON_USEDEP}]
66 + doc? (
67 + $(python_gen_any_dep '
68 + dev-python/docutils[${PYTHON_USEDEP}]
69 + dev-python/pygments[${PYTHON_USEDEP}]
70 + dev-python/sphinx[${PYTHON_USEDEP}]
71 + dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
72 + ')
73 + )
74 + test? (
75 + dev-python/cssselect[${PYTHON_USEDEP}]
76 + )
77 +"
78 +
79 +PATCHES=(
80 + "${FILESDIR}"/${PN}-4.6.0-tests-pypy.patch
81 +)
82 +
83 +python_check_deps() {
84 + use doc || return 0
85 + has_version -b "dev-python/docutils[${PYTHON_USEDEP}]" &&
86 + has_version -b "dev-python/pygments[${PYTHON_USEDEP}]" &&
87 + has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" &&
88 + has_version -b "dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]"
89 +}
90 +
91 +python_prepare_all() {
92 + # avoid replacing PYTHONPATH in tests.
93 + sed -i -e '/sys\.path/d' test.py || die
94 +
95 + # don't use some random SDK on Darwin
96 + sed -i -e '/_ldflags =/s/=.*isysroot.*darwin.*None/= None/' \
97 + setupinfo.py || die
98 +
99 + distutils-r1_python_prepare_all
100 +}
101 +
102 +python_compile() {
103 + tc-export PKG_CONFIG
104 + distutils-r1_python_compile
105 +}
106 +
107 +python_compile_all() {
108 + use doc && emake html
109 +}
110 +
111 +python_test() {
112 + local dir=${BUILD_DIR}/test$(python_get_sitedir)/lxml
113 + local -x PATH=${BUILD_DIR}/test/usr/bin:${PATH}
114 +
115 + cp -al "${BUILD_DIR}"/{install,test} || die
116 + cp -al src/lxml/tests "${dir}/" || die
117 + cp -al src/lxml/html/tests "${dir}/html/" || die
118 + ln -rs "${S}"/doc "${dir}"/../../ || die
119 +
120 + "${EPYTHON}" test.py -vv --all-levels -p || die "Test ${test} fails with ${EPYTHON}"
121 +}
122 +
123 +python_install_all() {
124 + if use doc; then
125 + local DOCS=( README.rst *.txt doc/*.txt )
126 + local HTML_DOCS=( doc/html/. )
127 + fi
128 + if use examples; then
129 + dodoc -r samples
130 + fi
131 +
132 + distutils-r1_python_install_all
133 +}
134 +
135 +pkg_postinst() {
136 + optfeature "Support for BeautifulSoup as a parser backend" dev-python/beautifulsoup4
137 + optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect
138 +}