diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2026-04-04 19:14:59 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2026-04-04 19:14:59 +0000 |
| commit | eb879137397b2780739bdbeddd7ea01439186c1c (patch) | |
| tree | ba318372285287dd4fa2c6661bc832810bd34b26 /dev-python/lxml | |
| parent | 50a73c5441045f14bdb49aededf33cd7f23ff891 (diff) | |
| download | baldeagleos-repo-eb879137397b2780739bdbeddd7ea01439186c1c.tar.gz baldeagleos-repo-eb879137397b2780739bdbeddd7ea01439186c1c.tar.xz baldeagleos-repo-eb879137397b2780739bdbeddd7ea01439186c1c.zip | |
Adding metadata
Diffstat (limited to 'dev-python/lxml')
| -rw-r--r-- | dev-python/lxml/Manifest | 3 | ||||
| -rw-r--r-- | dev-python/lxml/files/lxml-5.3.0-pypy.patch | 177 | ||||
| -rw-r--r-- | dev-python/lxml/files/lxml-5.4.0-cython-3.1.patch | 91 | ||||
| -rw-r--r-- | dev-python/lxml/lxml-5.4.0-r2.ebuild | 122 | ||||
| -rw-r--r-- | dev-python/lxml/lxml-6.0.0.ebuild | 120 | ||||
| -rw-r--r-- | dev-python/lxml/lxml-6.0.1.ebuild | 120 |
6 files changed, 0 insertions, 633 deletions
diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest index b6f4a15fc682..3d88d5bc57cd 100644 --- a/dev-python/lxml/Manifest +++ b/dev-python/lxml/Manifest @@ -1,4 +1 @@ -DIST lxml-5.4.0.gh.tar.gz 950906 BLAKE2B 00c47f34178df5f1b3555f5980a0c7ca9ecc5f0b54cc2756125fd6b2684e369563220c42d380f43af4e53ed2756ebfd71e9f6e1113aa192f14c76defb56c944a SHA512 a7f297b94fd88f20de9371bef207f8e95243a060b24e4006ec310c4a94f6147c8bb38fc3cff0f874f0b76282e745bb62e65a5cba2ce6e34ee54be0e3fde66724 -DIST lxml-6.0.0.gh.tar.gz 987497 BLAKE2B 9d3d61c4f478014942b276d8e5bb8137d67edf05294a821461bd4304a857481cff694a2d97a8c9cbffe0fef7d755aff7c6a6f67eae832f637ff2e5bdc105a7f3 SHA512 05519e03067de5d85be76994070c0a25f35eb52c2df5fc540aa6d2661af09636021c9b6b60d102c687cd9b8f800ecffdb9f2407d7d0f5bbbc43c4c0b38a3b18e -DIST lxml-6.0.1.gh.tar.gz 988844 BLAKE2B de4a2964f3118a40a1d2638134a29683297952b00c225477ede859be1f985c821e7125e3bb0be03866d08f7dff10971a23de63cfd16aa8ea805035b28124391b SHA512 7a41325af7b2b802ed368274444fbe4f272141c93f798ea60305c67a11484c73c5686dc24a37a784be1e574ad22bb4ff06111e868ef0567156e6a143f7742554 DIST lxml-6.0.2.gh.tar.gz 990107 BLAKE2B c01a94fef56754599100b65927b40c2d786d631f02bbfe6cff3865a00531ab26fc6a0fe5cf9b02bdcf01beb45ef94fd4436ed4c06f5c8fd9e707bcae80c0f2f4 SHA512 164dc5e38e394f4396faf0b06729039f6807a227e1a2755a6991e6dce569cc64244d5edfd2cf2af0d4e845d7155a76f6e391e32f3d5aac21dff3c07cbbe06460 diff --git a/dev-python/lxml/files/lxml-5.3.0-pypy.patch b/dev-python/lxml/files/lxml-5.3.0-pypy.patch deleted file mode 100644 index c83c73c81934..000000000000 --- a/dev-python/lxml/files/lxml-5.3.0-pypy.patch +++ /dev/null @@ -1,177 +0,0 @@ -From b6ba59657c8c7e169e8eeb763d85ca6136df3eea Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Fri, 29 Mar 2024 16:22:00 +0100 -Subject: [PATCH] skip tests that are broken on pypy - ---- - src/lxml/tests/test_http_io.py | 3 ++- - src/lxml/tests/test_nsclasses.py | 3 ++- - src/lxml/tests/test_objectify.py | 37 ++++++++++++++++++++++++++++++-- - 3 files changed, 39 insertions(+), 4 deletions(-) - -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 0c33f20c..08540001 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 39fe0098..92c857f8 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,5 @@ def test_suite(): - suite.addTests(doctest.DocTestSuite(objectify)) -- suite.addTests([make_doctest('objectify.txt')]) -+ if not IS_PYPY: -+ suite.addTests([make_doctest('objectify.txt')]) -+ suite.addTests([make_doctest('../../../doc/objectify.txt')]) - return suite --- -2.46.0 - diff --git a/dev-python/lxml/files/lxml-5.4.0-cython-3.1.patch b/dev-python/lxml/files/lxml-5.4.0-cython-3.1.patch deleted file mode 100644 index 4e7fbac5b4e2..000000000000 --- a/dev-python/lxml/files/lxml-5.4.0-cython-3.1.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 6d5d6aed2e38e1abc625f29c0b3e97fc8c60ae3b Mon Sep 17 00:00:00 2001 -From: Stefan Behnel <stefan_ml@behnel.de> -Date: Wed, 28 Aug 2024 11:16:55 +0200 -Subject: [PATCH] Avoid custom "tp_new()" call and add a safe-guard that - element lookups actually return a type. - ---- - src/lxml/etree.pyx | 12 +++++------- - src/lxml/includes/etree_defs.h | 8 ++------ - src/lxml/python.pxd | 1 - - 3 files changed, 7 insertions(+), 14 deletions(-) - -diff --git a/src/lxml/etree.pyx b/src/lxml/etree.pyx -index c21d1343..90579af9 100644 ---- a/src/lxml/etree.pyx -+++ b/src/lxml/etree.pyx -@@ -1636,11 +1636,6 @@ cdef public class _Element [ type LxmlElementType, object LxmlElement ]: - return CSSSelector(expr, translator=translator)(self) - - --cdef extern from "includes/etree_defs.h": -- # macro call to 't->tp_new()' for fast instantiation -- cdef object NEW_ELEMENT "PY_NEW" (object t) -- -- - @cython.linetrace(False) - cdef _Element _elementFactory(_Document doc, xmlNode* c_node): - cdef _Element result -@@ -1650,12 +1645,15 @@ cdef _Element _elementFactory(_Document doc, xmlNode* c_node): - if c_node is NULL: - return None - -- element_class = LOOKUP_ELEMENT_CLASS( -+ element_class = <type> LOOKUP_ELEMENT_CLASS( - ELEMENT_CLASS_LOOKUP_STATE, doc, c_node) -+ if type(element_class) is not type: -+ if not isinstance(element_class, type): -+ raise TypeError(f"Element class is not a type, got {type(element_class)}") - if hasProxy(c_node): - # prevent re-entry race condition - we just called into Python - return getProxy(c_node) -- result = NEW_ELEMENT(element_class) -+ result = element_class.__new__(element_class) - if hasProxy(c_node): - # prevent re-entry race condition - we just called into Python - result._c_node = NULL -diff --git a/src/lxml/includes/etree_defs.h b/src/lxml/includes/etree_defs.h -index 17d470d0..8645869f 100644 ---- a/src/lxml/includes/etree_defs.h -+++ b/src/lxml/includes/etree_defs.h -@@ -177,7 +177,7 @@ long _ftol2( double dblSource ) { return _ftol( dblSource ); } - - #ifdef __GNUC__ - /* Test for GCC > 2.95 */ --#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) -+#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) - #define unlikely_condition(x) __builtin_expect((x), 0) - #else /* __GNUC__ > 2 ... */ - #define unlikely_condition(x) (x) -@@ -190,10 +190,6 @@ long _ftol2( double dblSource ) { return _ftol( dblSource ); } - #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) - #endif - --#define PY_NEW(T) \ -- (((PyTypeObject*)(T))->tp_new( \ -- (PyTypeObject*)(T), __pyx_empty_tuple, NULL)) -- - #define _fqtypename(o) ((Py_TYPE(o))->tp_name) - - #define lxml_malloc(count, item_size) \ -@@ -268,7 +264,7 @@ static void* lxml_unpack_xmldoc_capsule(PyObject* capsule, int* is_owned) { - * 'inclusive' is 1). The _ELEMENT_ variants will only stop on nodes - * that match _isElement(), the normal variant will stop on every node - * except text nodes. -- * -+ * - * To traverse the node and all of its children and siblings in Pyrex, call - * cdef xmlNode* some_node - * BEGIN_FOR_EACH_ELEMENT_FROM(some_node.parent, some_node, 1) -diff --git a/src/lxml/python.pxd b/src/lxml/python.pxd -index d0877355..e0ec762e 100644 ---- a/src/lxml/python.pxd -+++ b/src/lxml/python.pxd -@@ -131,7 +131,6 @@ cdef extern from "includes/etree_defs.h": # redefines some functions as macros - cdef void* lxml_unpack_xmldoc_capsule(object capsule, bint* is_owned) except? NULL - cdef bint _isString(object obj) - cdef const_char* _fqtypename(object t) -- cdef object PY_NEW(object t) - cdef bint IS_PYPY - cdef object PyOS_FSPath(object obj) - diff --git a/dev-python/lxml/lxml-5.4.0-r2.ebuild b/dev-python/lxml/lxml-5.4.0-r2.ebuild deleted file mode 100644 index 970354b43914..000000000000 --- a/dev-python/lxml/lxml-5.4.0-r2.ebuild +++ /dev/null @@ -1,122 +0,0 @@ -# Copyright 1999-2025 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..14} ) - -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 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-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.3.0-pypy.patch" - # https://github.com/lxml/lxml/commit/6d5d6aed2e38e1abc625f29c0b3e97fc8c60ae3b - "${FILESDIR}/${PN}-5.4.0-cython-3.1.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() { - # 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() { - # disable automagic dep on coverage - use doc && emake CYTHON_WITH_COVERAGE= 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 - mkdir "${dir}"/../../doc || die - # this one needs to be copied, because upstream uses doc/../../../doc - cp -r "${S}"/doc "${dir}"/../../ || die - ln -s "${S}"/doc "${dir}"/../../../../ || die - - "${EPYTHON}" test.py --no-src -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 - optfeature "Support for lxml.html.clean sanitizer" dev-python/lxml-html-clean -} diff --git a/dev-python/lxml/lxml-6.0.0.ebuild b/dev-python/lxml/lxml-6.0.0.ebuild deleted file mode 100644 index 418209cf43c9..000000000000 --- a/dev-python/lxml/lxml-6.0.0.ebuild +++ /dev/null @@ -1,120 +0,0 @@ -# Copyright 1999-2025 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..14} ) - -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 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-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.1.2[${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}-6.0.0-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() { - # 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() { - # disable automagic dep on coverage - use doc && emake CYTHON_WITH_COVERAGE= 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 - mkdir "${dir}"/../../doc || die - # this one needs to be copied, because upstream uses doc/../../../doc - cp -r "${S}"/doc "${dir}"/../../ || die - ln -s "${S}"/doc "${dir}"/../../../../ || die - - "${EPYTHON}" test.py --no-src -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 - optfeature "Support for lxml.html.clean sanitizer" dev-python/lxml-html-clean -} diff --git a/dev-python/lxml/lxml-6.0.1.ebuild b/dev-python/lxml/lxml-6.0.1.ebuild deleted file mode 100644 index 418209cf43c9..000000000000 --- a/dev-python/lxml/lxml-6.0.1.ebuild +++ /dev/null @@ -1,120 +0,0 @@ -# Copyright 1999-2025 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..14} ) - -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 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-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.1.2[${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}-6.0.0-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() { - # 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() { - # disable automagic dep on coverage - use doc && emake CYTHON_WITH_COVERAGE= 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 - mkdir "${dir}"/../../doc || die - # this one needs to be copied, because upstream uses doc/../../../doc - cp -r "${S}"/doc "${dir}"/../../ || die - ln -s "${S}"/doc "${dir}"/../../../../ || die - - "${EPYTHON}" test.py --no-src -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 - optfeature "Support for lxml.html.clean sanitizer" dev-python/lxml-html-clean -} |
