summaryrefslogtreecommitdiff
path: root/dev-python/lxml
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-04-01 14:13:28 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-04-01 14:13:28 +0100
commit5b1915ddf98b64efdd976ca4d8fce232faf7a247 (patch)
treeab7ad1f46a7cbc0c887d4f807de70019853b9acd /dev-python/lxml
parent48e7f15d37baf7167041b2ab0e2a19a703e5c99f (diff)
gentoo auto-resync : 01:04:2024 - 14:13:28
Diffstat (limited to 'dev-python/lxml')
-rw-r--r--dev-python/lxml/Manifest2
-rw-r--r--dev-python/lxml/lxml-5.2.0.ebuild128
2 files changed, 130 insertions, 0 deletions
diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
index 8d5f08c4358a..606e887a5dda 100644
--- a/dev-python/lxml/Manifest
+++ b/dev-python/lxml/Manifest
@@ -2,6 +2,8 @@ AUX lxml-5.1.0-pypy.patch 6885 BLAKE2B 132f2b9037c662f41fd55a0846ac211a6a54a7ac0
AUX lxml-5.1.1-pypy.patch 6414 BLAKE2B 367cb47fe9466a1f0035fc26884cc55109b2dd69291993f7f2711a943023e5d2b3436f26c879126b4df1b50f0829845fb312eaae6f3bc40cb083a62c6504dc54 SHA512 b95790c42023a296f2eee06b93b381d74e2b7742eb833c22a8a98888cbbadd84032295bdc880c7df98e7ca7aeb8b66c6114e902cdeba0910a91dd8a46269e470
DIST lxml-5.1.0.gh.tar.gz 962111 BLAKE2B 31c82eb198911d82fd9f7882bf94547b2367f3b3d1183eb8e8f97297b96faa69230d27b3367160b1f732a5d0878296b2d11787c3b220416c81a920e62ebec4f2 SHA512 1fadfeac1fb8b1e4fb1f7f2acb056865eb2567300a6c728eaede380d846ac75a6e33ebebcbbc6d60f54102152afd5dddf970058c4e27af396e9fa58e83c407a7
DIST lxml-5.1.1.gh.tar.gz 963649 BLAKE2B 0cb7b4e39539ee962cd590b2b2dc644a111a094da9cbccc2ee0c29b9a758d8aca967f989693c76532252909dc44a96a3815273f04f28be2dbeb57d4daae2e6fd SHA512 bb479ca7dcce944a9a3597f67da1b12fb9f3a05592fb8342fe01bc569a86df95c32c7bf1bc0b9cfc0ddffb85adf12612fb2d8622a460357c1aaa56e033476375
+DIST lxml-5.2.0.gh.tar.gz 949400 BLAKE2B 4a1640e1da27504e6a9b5e1c55fa2d51eb2e27f6400b63dae29aa42c6c9bf9a002374d0c4ec3ccd13452efd4f39f0a28dc5989fe7f1da5c80e17b2fb31a0dcae SHA512 5d4faab6430666427a7540b768a81beb5c628e7801a06156a68a03a5f75e424e61b1dfd792b8909e03e8561ffb0be64f62c86a411c110c01a021f4cbf37593f2
EBUILD lxml-5.1.0.ebuild 2902 BLAKE2B 10c758230f1c4fdb3084295749f3d2a0752983b142a56cd6d9362be2dd8d99c7d9bdc72ce74b02b1c5df5fc505ce5df65d87a9297367dfa5f72af83573563962 SHA512 d278b800a03de26b91873dedb0d7c8643f2cfb3e3e691b50e318a8d5575f11359239323fab141fce64a5b04c3d4db9dab3803e62fe85cfb3647023fb692bbd52
EBUILD lxml-5.1.1.ebuild 2917 BLAKE2B da7c786b8a21a844c6b1f7fea8124fa900bfcacb6a0cda1f34a5b997878ec4ae4ba112ff8f61c661236129115468e901e4442e0849114059d033a5c103d2b6ea SHA512 8267821e6d1bfc08e1d3200a3129376852419854568c1be3110749a78fd270fcffde1b9a77daf0620787b875429e4c4b116c2ade5fc1241a76d25ada279076cb
+EBUILD lxml-5.2.0.ebuild 3274 BLAKE2B de297284a590885fd96e79308c6999dd9a8abfc35f7a3c6eaeb947134ad7b80a7fbebde96e95c9f5d9771d0f7c3775014db0c178d897b0436023ae3a433f0f3b SHA512 c2217d56a20c3549f90d41cb7265916672b64f98e6ff9999b21c1b1652518bb85836755597a1edd3721d2e24d50f852ed91af5a790dddad1782c7aa5280ab2b9
MISC metadata.xml 463 BLAKE2B 9bcd092b61568f5d467230617b101f36245c41078e6a66c7ff63b22a6b4095de2ba3a59e48ce8b7842ce58d1255fa293995652daa3fab4c3af988498eaa30e97 SHA512 2ba5e340b59e0de4e472380e9c19b1f6f573e86e5c3c2e075f6151d369e94eea70e3ce36bfb5ece4da3fa69459e3ff83368f1df8302aa5754ae52f13c8f2312e
diff --git a/dev-python/lxml/lxml-5.2.0.ebuild b/dev-python/lxml/lxml-5.2.0.ebuild
new file mode 100644
index 000000000000..9153f366839c
--- /dev/null
+++ b/dev-python/lxml/lxml-5.2.0.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} pypy3 )
+
+inherit distutils-r1 optfeature toolchain-funcs
+
+DESCRIPTION="A Pythonic binding for the libxml2 and libxslt libraries"
+HOMEPAGE="
+ https://lxml.de/
+ https://pypi.org/project/lxml/
+ https://github.com/lxml/lxml/
+"
+SRC_URI="
+ https://github.com/lxml/lxml/archive/${P}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+S=${WORKDIR}/lxml-${P}
+
+LICENSE="BSD ElementTree GPL-2 PSF-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="doc examples +threads test"
+RESTRICT="!test? ( test )"
+
+# Note: lib{xml2,xslt} are used as C libraries, not Python modules.
+DEPEND="
+ >=dev-libs/libxml2-2.10.3
+ >=dev-libs/libxslt-1.1.38
+"
+RDEPEND="
+ ${DEPEND}
+"
+BDEPEND="
+ virtual/pkgconfig
+ >=dev-python/cython-3.0.10[${PYTHON_USEDEP}]
+ doc? (
+ $(python_gen_any_dep '
+ dev-python/docutils[${PYTHON_USEDEP}]
+ dev-python/pygments[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]
+ ')
+ )
+ test? (
+ dev-python/cssselect[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-5.1.1-pypy.patch"
+)
+
+python_check_deps() {
+ use doc || return 0
+ python_has_version -b "dev-python/docutils[${PYTHON_USEDEP}]" &&
+ python_has_version -b "dev-python/pygments[${PYTHON_USEDEP}]" &&
+ python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" &&
+ python_has_version -b "dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]"
+}
+
+python_prepare_all() {
+ # avoid replacing PYTHONPATH in tests.
+ sed -i -e '/sys\.path/d' test.py || die
+
+ # don't use some random SDK on Darwin
+ sed -i -e '/_ldflags =/s/=.*isysroot.*darwin.*None/= None/' \
+ setupinfo.py || die
+
+ # don't depend on sys-apps/which
+ sed -i -e 's:which:command -v:' Makefile || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile() {
+ local DISTUTILS_ARGS=(
+ # by default it adds -w to CFLAGS
+ --warnings
+ )
+ tc-export PKG_CONFIG
+ distutils-r1_python_compile
+}
+
+python_compile_all() {
+ use doc && emake html
+}
+
+python_test() {
+ local dir=${BUILD_DIR}/test$(python_get_sitedir)/lxml
+ local -x PATH=${BUILD_DIR}/test/usr/bin:${PATH}
+
+ cp -al "${BUILD_DIR}"/{install,test} || die
+ cp -al src/lxml/tests "${dir}/" || die
+ cp -al src/lxml/html/tests "${dir}/html/" || die
+ ln -rs "${S}"/doc "${dir}"/../../ || die
+
+ # test_feedparser_data requires lxml_html_clean
+ # this is the *simplest* way of skipping these without breaking
+ # random other tests, sigh
+ sed -e '/lxml\.html\.clean/d' \
+ -i "${dir}"/html/tests/test_feedparser_data.py || die
+ rm -r "${dir}"/html/tests/*-data/*.data || die
+
+ "${EPYTHON}" test.py -vv --all-levels -p ||
+ die "Tests fail on ${EPYTHON}"
+}
+
+python_install_all() {
+ if use doc; then
+ local DOCS=( README.rst *.txt doc/*.txt )
+ local HTML_DOCS=( doc/html/. )
+ fi
+ if use examples; then
+ dodoc -r samples
+ fi
+
+ distutils-r1_python_install_all
+}
+
+pkg_postinst() {
+ optfeature "Support for BeautifulSoup as a parser backend" dev-python/beautifulsoup4
+ optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect
+}