dev-python/lxml: add 5.1.0

Signed-off-by: Andreas Billmeier <b@edevau.net>
This commit is contained in:
Andreas Billmeier 2024-09-22 09:42:08 +02:00
parent f1e93f67d8
commit 22873b499b
Signed by: onkelbeh
GPG Key ID: E6DB12C8C550F3C0
4 changed files with 124 additions and 181 deletions

View File

@ -606,22 +606,22 @@ A daily compile test is run at Github with Python 3.9 to catch general faults. E
## Licenses
This repository itself is released under GPL-3 (like most Gentoo repositories), all work on the depending components under the licenses they came from. Perhaps you came here because I filed an issue at your component about a bad or missing license. It is easy to [assign a license](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/adding-a-license-to-a-repository). During cleanups and license investigations I have been asked often which license to choose. I am not a lawyer, but I can offer the following table, counted over this repository, perhaps this helps your decision. If a package has more than one license listed, all of them are counted.
There are 1993 Ebuilds in total, 1982 of them have in total 2007 (42 different) licenses assigned.
There are 1994 Ebuilds in total, 1983 of them have in total 2011 (42 different) licenses assigned.
|License| Ebuilds using it|
|-------|-----|
|MIT|1153|
|Apache-2.0|444|
|GPL-3|117|
|BSD|112|
|BSD|113|
|LGPL-3|25|
|GPL-2|24|
|GPL-2|25|
|GPL-3+|16|
|all-rights-reserved|15|
|BSD-2|14|
|LGPL-3+|14|
|Unlicense|9|
|PSF-2|8|
|PSF-2|9|
|ISC|6|
|MPL-2.0|6|
|EPL-1.0|4|
@ -632,6 +632,7 @@ There are 1993 Ebuilds in total, 1982 of them have in total 2007 (42 different)
|LGPL-2+|2|
|public-domain|2|
|LGPL-2.1|2|
|ElementTree|2|
|BSD-4|2|
|LGPL-2|2|
|CC0-1.0|2|
@ -644,7 +645,6 @@ There are 1993 Ebuilds in total, 1982 of them have in total 2007 (42 different)
|ECL-2.0|1|
|Boost-1.0|1|
|PSF-2.4|1|
|ElementTree|1|
|NEWLIB|1|
|HPND|1|
|CC-BY-NC-SA-3.0|1|

View File

@ -1,6 +1,7 @@
AUX lxml-4.6.0-tests-pypy.patch 18051 BLAKE2B 99d97fa2e874c9bec4a866c3303b54ea2ab1e6abddf148d142cb66ee035b1eab1e05eed924d34451c5db38dc37f77104539cbfc2fe45815c17445b6359dcb857 SHA512 f6c6c2b00a49e6ca19d8b9123c364003a682c2e8df0c42d8600085d1cb094ba5cedd162bfc794e7d9acfff93aac771953dca5a879c3b957af1e2e8bd1db05515
AUX lxml-5.1.0-pypy.patch 6885 BLAKE2B 132f2b9037c662f41fd55a0846ac211a6a54a7ac0d976aee815f4dfc787636da2c479f1cd7b2152ad3bbd47fd12e1c0307188f94f8a0c86789d7a84910e46c58 SHA512 4a10ac07626cc69c64ca87ac6c63b03fb1d05631bd7433fac6eca5c46ed896be5d8bc0598d833d6a117adf88d537d8b7b07adbff0457e168def4d6139f11ac9f
DIST lxml-4.9.1.gh.tar.gz 960663 BLAKE2B bb464757f9188a76661732d237f3b0f9010f51dd9c5426b578ca8fdb486d28fcfec81d4dd817b2fa0601ed9d7890e01ce71e4ea4c842b92e59dd5437200bad22 SHA512 f52d54908f92997f610638a9a3054cb73723ae81a5ad9e77918b0603ec7441b0e7d2143f8a8ac66c05cd6a0b3b298d348397b7e2df19f83c21e336514c47d910
DIST lxml-5.1.0.gh.tar.gz 962111 BLAKE2B 31c82eb198911d82fd9f7882bf94547b2367f3b3d1183eb8e8f97297b96faa69230d27b3367160b1f732a5d0878296b2d11787c3b220416c81a920e62ebec4f2 SHA512 1fadfeac1fb8b1e4fb1f7f2acb056865eb2567300a6c728eaede380d846ac75a6e33ebebcbbc6d60f54102152afd5dddf970058c4e27af396e9fa58e83c407a7
EBUILD lxml-4.9.1.ebuild 2679 BLAKE2B c248fdc054552eb352b4761d51ed192d50262075a1849d65b0b5217b51f21d64f8a918d4177ae16181f534ae6e44cb6548ce20254f9a4d581af0bc4adc370e7b SHA512 d5dced1473c3a0e29ea89c8ca2c5e45d578ce53dd3a7ce4c8c0d3af831c295032fd96d2670ebb8deb01257f62d0273df4bb881f55bb50859718f6fa5fe3bf59b
MISC lxml-5.1.0-pypy.patch 6885 BLAKE2B 132f2b9037c662f41fd55a0846ac211a6a54a7ac0d976aee815f4dfc787636da2c479f1cd7b2152ad3bbd47fd12e1c0307188f94f8a0c86789d7a84910e46c58 SHA512 4a10ac07626cc69c64ca87ac6c63b03fb1d05631bd7433fac6eca5c46ed896be5d8bc0598d833d6a117adf88d537d8b7b07adbff0457e168def4d6139f11ac9f
EBUILD lxml-5.1.0.ebuild 2758 BLAKE2B e378ad29380e9c38f74f0254d35185590dab541b31e73b2706ec9fc2381231dc800100539ab3c9171e2f6caf52bd167e44eda34538b9c7f4c537e37e5454dbc3 SHA512 e74fd6bcada657c08349cf853a2dd0b94dbbb93d244f120505951f26441cf64806756893acd268bde6de92c078f9688500ec5b82c5d69caf80e79958eef0677f
MISC metadata.xml 497 BLAKE2B e7115c2a7a383890c4352ad4c7671726546c67e2c5f33ee9132239071776731d8264212a421e5692c0096b741150f75c2dccb8be3d49a0917c372b741f88189d SHA512 4c933fd511cbb980691f4180e0d7c1f47e367a3ed056bc84e616fd2507020493f8365835e9d186f043c5f11d91193c0200ea9f890949e7e1e8b8faee203cb025

View File

@ -1,175 +0,0 @@
diff --git a/src/lxml/tests/test_errors.py b/src/lxml/tests/test_errors.py
index fa735c28..9337bc04 100644
--- a/src/lxml/tests/test_errors.py
+++ b/src/lxml/tests/test_errors.py
@@ -10,3 +10,3 @@ from lxml import etree
-from .common_imports import HelperTestCase
+from .common_imports import HelperTestCase, IS_PYPY
@@ -24,2 +24,3 @@ class ErrorTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_element_cyclic_gc_none(self):
diff --git a/src/lxml/tests/test_http_io.py b/src/lxml/tests/test_http_io.py
index 8385e393..0b259299 100644
--- a/src/lxml/tests/test_http_io.py
+++ b/src/lxml/tests/test_http_io.py
@@ -10,3 +10,3 @@ import gzip
-from .common_imports import etree, HelperTestCase, BytesIO, _bytes
+from .common_imports import etree, HelperTestCase, BytesIO, _bytes, IS_PYPY
from .dummy_http_server import webserver, HTTPRequestCollector
@@ -14,2 +14,3 @@ from .dummy_http_server import webserver, HTTPRequestCollector
+@unittest.skipIf(IS_PYPY, "broken on pypy")
class HttpIOTestCase(HelperTestCase):
diff --git a/src/lxml/tests/test_nsclasses.py b/src/lxml/tests/test_nsclasses.py
index 750dc1ed..adbec11c 100644
--- a/src/lxml/tests/test_nsclasses.py
+++ b/src/lxml/tests/test_nsclasses.py
@@ -8,3 +8,3 @@ import unittest
-from .common_imports import etree, HelperTestCase, _bytes, make_doctest
+from .common_imports import etree, HelperTestCase, _bytes, make_doctest, IS_PYPY
@@ -45,2 +45,3 @@ class ETreeNamespaceClassesTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_ns_classes(self):
diff --git a/src/lxml/tests/test_objectify.py b/src/lxml/tests/test_objectify.py
index 1c8ff47c..326c5316 100644
--- a/src/lxml/tests/test_objectify.py
+++ b/src/lxml/tests/test_objectify.py
@@ -10,3 +10,4 @@ import unittest
from .common_imports import (
- etree, HelperTestCase, fileInTestDir, doctest, make_doctest, _bytes, _str, BytesIO
+ etree, HelperTestCase, fileInTestDir, doctest, make_doctest, _bytes, _str, BytesIO,
+ IS_PYPY
)
@@ -383,2 +384,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_setattr(self):
@@ -818,2 +820,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_build_tree(self):
@@ -847,2 +850,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_bool(self):
@@ -884,2 +888,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_str(self):
@@ -891,2 +896,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_str_intliteral(self):
@@ -898,2 +904,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_str_floatliteral(self):
@@ -905,2 +912,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_str_mul(self):
@@ -917,2 +925,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_str_add(self):
@@ -992,2 +1001,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_ustr(self):
@@ -999,2 +1009,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_ustr_intliteral(self):
@@ -1006,2 +1017,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_ustr_floatliteral(self):
@@ -1013,2 +1025,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_ustr_mul(self):
@@ -1025,2 +1038,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_ustr_add(self):
@@ -1050,2 +1064,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_int(self):
@@ -1066,2 +1081,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_float(self):
@@ -1082,2 +1098,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_float_precision(self):
@@ -1101,2 +1118,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_float_precision_consistency(self):
@@ -1187,2 +1205,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_unregistered(self):
@@ -1349,2 +1368,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_str_cmp(self):
@@ -1376,2 +1396,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_int_cmp(self):
@@ -1398,2 +1419,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_type_bool_cmp(self):
@@ -2067,2 +2089,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_registered_type_stringify(self):
@@ -2537,2 +2560,3 @@ class ObjectifyTestCase(HelperTestCase):
# type-looked-up as ObjectifiedElement (no annotations)
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_efactory_int(self):
@@ -2542,2 +2566,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_efactory_float(self):
@@ -2547,2 +2572,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_efactory_str(self):
@@ -2552,2 +2578,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_efactory_unicode(self):
@@ -2557,2 +2584,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_efactory_bool(self):
@@ -2562,2 +2590,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_efactory_none(self):
@@ -2567,2 +2596,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_efactory_value_concatenation(self):
@@ -2577,2 +2607,3 @@ class ObjectifyTestCase(HelperTestCase):
+ @unittest.skipIf(IS_PYPY, "broken on pypy")
def test_efactory_nested(self):
@@ -2745,3 +2776,4 @@ def test_suite():
suite.addTests(doctest.DocTestSuite(objectify))
- suite.addTests([make_doctest('../../../doc/objectify.txt')])
+ if not IS_PYPY:
+ suite.addTests([make_doctest('../../../doc/objectify.txt')])
return suite

View File

@ -0,0 +1,117 @@
# 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_{11..13} )
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="amd64 arm arm64 x86"
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.7[${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}/${P}-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
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
"${EPYTHON}" test.py -vv --all-levels -p || die "Test ${test} fails with ${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
}