public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/files/, dev-python/lxml/
@ 2016-12-22 22:46 Lars Wendler
  0 siblings, 0 replies; 11+ messages in thread
From: Lars Wendler @ 2016-12-22 22:46 UTC (permalink / raw
  To: gentoo-commits

commit:     da33dd882cd94c5e77764cb73ef7cce3193f23b3
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 22 22:22:10 2016 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Dec 22 22:45:46 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da33dd88

dev-python/lxml: Removed old.

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 dev-python/lxml/Manifest                           |  2 -
 .../lxml/files/lxml-3.4.4-cross-compile.patch      | 36 ----------
 dev-python/lxml/lxml-3.4.4-r1.ebuild               | 81 ----------------------
 dev-python/lxml/lxml-3.4.4.ebuild                  | 78 ---------------------
 dev-python/lxml/lxml-3.5.0-r1.ebuild               | 81 ----------------------
 dev-python/lxml/lxml-3.5.0.ebuild                  | 70 -------------------
 6 files changed, 348 deletions(-)

diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
index ac265e4..4f34f2f 100644
--- a/dev-python/lxml/Manifest
+++ b/dev-python/lxml/Manifest
@@ -1,5 +1,3 @@
-DIST lxml-3.4.4.tar.gz 3537508 SHA256 b3d362bac471172747cda3513238f115cbd6c5f8b8e6319bf6a97a7892724099 SHA512 94453ff0562fc18a4b43555271e2469556255b69daf5f801d1a0f1ff29fd73f4b46d4faba9bfe86b42cfdac31005a0d3cfcbf230e0c7593dd5fc6461afcad906 WHIRLPOOL 6debafb391c94bd57510498c8261a511759f52feb3065c8bdf3103b177b1ddcbad54968f1eceac07b97e42087a1c59a060a3719f9ea9d25a662da34bf314b89e
-DIST lxml-3.5.0.tar.gz 3810202 SHA256 349f93e3a4b09cc59418854ab8013d027d246757c51744bf20069bc89016f578 SHA512 9b728642bec22be39aef603050121715521603a50bc01d3851e1eb7bfc6302c991da3a3bdebfdeaa9038e19fe39d8286f60851fecf1c4e85469f0ed8fa6e9368 WHIRLPOOL 50b9d3767377a5dee7359e4651bb91bc84539cbc18b552f07b9cf9b9f3f263c8cc3aae64adafb88a78776235a5f3780342d7b29cd369b77e8dc9ef8f8739a290
 DIST lxml-3.6.0.tar.gz 3693901 SHA256 9c74ca28a7f0c30dca8872281b3c47705e21217c8bc63912d95c9e2a7cac6bdf SHA512 2dd25a4f51e3e71b78e82e32f3838137d8b21936c23c16f901f4180277c4d4b7f14e1f47d306022cc1d13dc2e0b7f405319632e554aa989f551f424cc423d60d WHIRLPOOL 081c97bca209bc234dfb4e439da45ecde1cfd4c2da31384601c96293a5ab5def9d713bee612b4c84a5372d5b9035126ff6cbc496bd56b141f89b6a4fe916540b
 DIST lxml-3.6.4.tar.gz 3707675 SHA256 61d5d3e00b5821e6cda099b3b4ccfea4527bf7c595e0fb3a7a760490cedd6172 SHA512 0412b266d7a70af21f2e4e05d63c3ce63049661ef27e2bf190cbfe1e982b6980fe980a998a360796b958fa9e148ae5bb48136354d4b0bb042055340e37f61e1e WHIRLPOOL b9cd81c885a1b12c36b50f4d616214f1912baed7991a3178e9415bffff74277c849b2e7c82fd7f27fb984148267348f5a72088d0b175ebf2731a16b876988255
 DIST lxml-3.7.0.tar.gz 3788603 SHA256 9c62eb2a1862e1ae285d7e7e3b7dc8772d387b19258086afcec143c6b7b8a5c9 SHA512 c34081332bcb911fb3be820300ec78e1e310fcef8b44d1b1ae28424de7f29b215b1266b1bc0ee50696b989b258e1af2774980c5bea96b403151596407522bdc8 WHIRLPOOL 050336ad26a7addeae34648fa9a30eabce4cf5b79bf84967f25854eb60ba8182b5ce21986fa4cb92081068c9561e9c4b00fde4e0f9c5929b25b5c7f0d3422bf2

diff --git a/dev-python/lxml/files/lxml-3.4.4-cross-compile.patch b/dev-python/lxml/files/lxml-3.4.4-cross-compile.patch
deleted file mode 100644
index 049b884..00000000
--- a/dev-python/lxml/files/lxml-3.4.4-cross-compile.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-use pkg-config to find libxml2/libxslt details rather than xxx-config scripts
-
---- a/setupinfo.py
-+++ b/setupinfo.py
-@@ -87,19 +87,6 @@ def ext_modules(static_include_dirs, static_library_dirs,
-         source_extension = ".c"
-         print("Building without Cython.")
- 
--    lib_versions = get_library_versions()
--    versions_ok = True
--    if lib_versions[0]:
--        print("Using build configuration of libxml2 %s and libxslt %s" %
--              lib_versions)
--        versions_ok = check_min_version(lib_versions[0], (2, 7, 0), 'libxml2')
--    else:
--        print("Using build configuration of libxslt %s" %
--              lib_versions[1])
--    versions_ok |= check_min_version(lib_versions[1], (1, 1, 23), 'libxslt')
--    if not versions_ok:
--        raise RuntimeError("Dependency missing")
--
-     _include_dirs = include_dirs(static_include_dirs)
-     _library_dirs = library_dirs(static_library_dirs)
-     _cflags = cflags(static_cflags)
-@@ -310,8 +297,9 @@ def get_library_versions():
- 
- 
- def flags(option):
--    xml2_flags = run_command(find_xml2_config(), "--%s" % option)
--    xslt_flags = run_command(find_xslt_config(), "--%s" % option)
-+    pkg_config = os.environ.get('PKG_CONFIG', 'pkg-config')
-+    xml2_flags = run_command(pkg_config, 'libxml-2.0', '--%s' % option)
-+    xslt_flags = run_command(pkg_config, 'libxslt', '--%s' % option)
- 
-     flag_list = xml2_flags.split()
-     for flag in xslt_flags.split():

diff --git a/dev-python/lxml/lxml-3.4.4-r1.ebuild b/dev-python/lxml/lxml-3.4.4-r1.ebuild
deleted file mode 100644
index f6c571b..00000000
--- a/dev-python/lxml/lxml-3.4.4-r1.ebuild
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 python3_{4,5} )
-
-inherit distutils-r1 eutils flag-o-matic toolchain-funcs
-
-DESCRIPTION="A Pythonic binding for the libxml2 and libxslt libraries"
-HOMEPAGE="http://lxml.de/ https://pypi.python.org/pypi/lxml/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="BSD ElementTree GPL-2 PSF-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc examples +threads test"
-
-# Note: lib{xml2,xslt} are used as C libraries, not Python modules.
-RDEPEND="
-	>=dev-libs/libxml2-2.7.2
-	>=dev-libs/libxslt-1.1.23"
-DEPEND="${RDEPEND}
-	dev-python/setuptools[${PYTHON_USEDEP}]
-	test? ( dev-python/cssselect[${PYTHON_USEDEP}] )
-	"
-
-DISTUTILS_IN_SOURCE_BUILD=1
-
-PATCHES=(
-	"${FILESDIR}"/${P}-cross-compile.patch
-
-	# This patch removes a testcase that fails because of issues
-	# in libxml2.
-	#
-	# Upstream bug: https://bugs.launchpad.net/lxml/+bug/1608479
-	"${FILESDIR}"/${PN}-3.6.4-fix-test_xmlschema.patch
-)
-
-python_prepare_all() {
-	# avoid replacing PYTHONPATH in tests.
-	sed -i '/sys\.path/d' test.py || die
-
-	distutils-r1_python_prepare_all
-}
-
-python_compile() {
-	if [[ ${EPYTHON} != python3* ]]; then
-		local -x CFLAGS="${CFLAGS}"
-		append-cflags -fno-strict-aliasing
-	fi
-	tc-export PKG_CONFIG
-	distutils-r1_python_compile
-}
-
-python_test() {
-	cp -r -l src/lxml/tests "${BUILD_DIR}"/lib/lxml/ || die
-	cp -r -l src/lxml/html/tests "${BUILD_DIR}"/lib/lxml/html/ || die
-	ln -s "${S}"/doc "${BUILD_DIR}"/ || die
-
-	"${EPYTHON}" test.py -vv --all-levels -p || die "Test ${test} fails with ${EPYTHON}"
-}
-
-python_install_all() {
-	if use doc; then
-		local DOCS=( *.txt doc/*.txt )
-		local HTML_DOCS=( doc/html/. )
-	fi
-	if use examples; then
-		docinto examples
-		dodoc -r samples/.
-	fi
-
-	distutils-r1_python_install_all
-}
-
-pkg_postinst() {
-	optfeature "Support for BeautifulSoup3 as a parser backend" dev-python/beautifulsoup
-	optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect
-}

diff --git a/dev-python/lxml/lxml-3.4.4.ebuild b/dev-python/lxml/lxml-3.4.4.ebuild
deleted file mode 100644
index eedde0a..00000000
--- a/dev-python/lxml/lxml-3.4.4.ebuild
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 python3_{4,5} )
-
-inherit distutils-r1 eutils flag-o-matic toolchain-funcs
-
-DESCRIPTION="A Pythonic binding for the libxml2 and libxslt libraries"
-HOMEPAGE="http://lxml.de/ https://pypi.python.org/pypi/lxml/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="BSD ElementTree GPL-2 PSF-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc examples +threads test"
-
-# Note: lib{xml2,xslt} are used as C libraries, not Python modules.
-RDEPEND="
-	>=dev-libs/libxml2-2.7.2
-	>=dev-libs/libxslt-1.1.23"
-DEPEND="${RDEPEND}
-	dev-python/setuptools[${PYTHON_USEDEP}]
-	test? ( dev-python/cssselect[${PYTHON_USEDEP}] )
-	"
-# lxml tarball contains files pregenerated by Cython.
-
-DISTUTILS_IN_SOURCE_BUILD=1
-
-python_prepare_all() {
-	epatch "${FILESDIR}"/${P}-cross-compile.patch
-
-	# avoid replacing PYTHONPATH in tests.
-	sed -i '/sys\.path/d' test.py || die
-
-	# seems to be broken
-	rm src/lxml/tests/test_elementpath.py || die
-
-	distutils-r1_python_prepare_all
-}
-
-python_compile() {
-	if [[ ${EPYTHON} != python3* ]]; then
-		local CFLAGS=${CFLAGS}
-		append-cflags -fno-strict-aliasing
-	fi
-	tc-export PKG_CONFIG
-	distutils-r1_python_compile
-}
-
-python_test() {
-	cp -r -l src/lxml/tests "${BUILD_DIR}"/lib/lxml/ || die
-	cp -r -l src/lxml/html/tests "${BUILD_DIR}"/lib/lxml/html/ || die
-	ln -s "${S}"/doc "${BUILD_DIR}"/ || die
-
-	local test
-	for test in test.py selftest.py selftest2.py; do
-		einfo "Running ${test}"
-		"${PYTHON}" ${test} -vv -p || die "Test ${test} fails with ${EPYTHON}"
-	done
-}
-
-python_install_all() {
-	if use doc; then
-		local DOCS=( *.txt doc/*.txt )
-		local HTML_DOCS=( doc/html/. )
-	fi
-	use examples && local EXAMPLES=( samples/. )
-
-	distutils-r1_python_install_all
-}
-
-pkg_postinst() {
-	optfeature "Support for BeautifulSoup3 as a parser backend" dev-python/beautifulsoup
-	optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect
-}

diff --git a/dev-python/lxml/lxml-3.5.0-r1.ebuild b/dev-python/lxml/lxml-3.5.0-r1.ebuild
deleted file mode 100644
index bbaf02f..00000000
--- a/dev-python/lxml/lxml-3.5.0-r1.ebuild
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 python3_{4,5} )
-
-inherit distutils-r1 eutils flag-o-matic toolchain-funcs
-
-DESCRIPTION="A Pythonic binding for the libxml2 and libxslt libraries"
-HOMEPAGE="http://lxml.de/ https://pypi.python.org/pypi/lxml/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="BSD ElementTree GPL-2 PSF-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc examples +threads test"
-
-# Note: lib{xml2,xslt} are used as C libraries, not Python modules.
-RDEPEND="
-	>=dev-libs/libxml2-2.9.2
-	>=dev-libs/libxslt-1.1.28"
-DEPEND="${RDEPEND}
-	dev-python/setuptools[${PYTHON_USEDEP}]
-	test? ( dev-python/cssselect[${PYTHON_USEDEP}] )
-	"
-
-DISTUTILS_IN_SOURCE_BUILD=1
-
-PATCHES=(
-	"${FILESDIR}"/${P}-cross-compile.patch
-
-	# This patch removes a testcase that fails because of issues
-	# in libxml2.
-	#
-	# Upstream bug: https://bugs.launchpad.net/lxml/+bug/1608479
-	"${FILESDIR}"/${PN}-3.6.4-fix-test_xmlschema.patch
-)
-
-python_prepare_all() {
-	# avoid replacing PYTHONPATH in tests.
-	sed -i '/sys\.path/d' test.py || die
-
-	distutils-r1_python_prepare_all
-}
-
-python_compile() {
-	if [[ ${EPYTHON} != python3* ]]; then
-		local -x CFLAGS="${CFLAGS}"
-		append-cflags -fno-strict-aliasing
-	fi
-	tc-export PKG_CONFIG
-	distutils-r1_python_compile
-}
-
-python_test() {
-	cp -r -l src/lxml/tests "${BUILD_DIR}"/lib/lxml/ || die
-	cp -r -l src/lxml/html/tests "${BUILD_DIR}"/lib/lxml/html/ || die
-	ln -s "${S}"/doc "${BUILD_DIR}"/ || die
-
-	"${EPYTHON}" test.py -vv --all-levels -p || die "Test ${test} fails with ${EPYTHON}"
-}
-
-python_install_all() {
-	if use doc; then
-		local DOCS=( *.txt doc/*.txt )
-		local HTML_DOCS=( doc/html/. )
-	fi
-	if use examples; then
-		docinto examples
-		dodoc -r samples/.
-	fi
-
-	distutils-r1_python_install_all
-}
-
-pkg_postinst() {
-	optfeature "Support for BeautifulSoup3 as a parser backend" dev-python/beautifulsoup
-	optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect
-}

diff --git a/dev-python/lxml/lxml-3.5.0.ebuild b/dev-python/lxml/lxml-3.5.0.ebuild
deleted file mode 100644
index ba76872..00000000
--- a/dev-python/lxml/lxml-3.5.0.ebuild
+++ /dev/null
@@ -1,70 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 python3_{4,5} )
-
-inherit distutils-r1 eutils flag-o-matic toolchain-funcs
-
-DESCRIPTION="A Pythonic binding for the libxml2 and libxslt libraries"
-HOMEPAGE="http://lxml.de/ https://pypi.python.org/pypi/lxml/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="BSD ElementTree GPL-2 PSF-2"
-SLOT="0"
-KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc examples +threads test"
-
-# Note: lib{xml2,xslt} are used as C libraries, not Python modules.
-RDEPEND="
-	>=dev-libs/libxml2-2.9.2
-	>=dev-libs/libxslt-1.1.28"
-DEPEND="${RDEPEND}
-	dev-python/setuptools[${PYTHON_USEDEP}]
-	test? ( dev-python/cssselect[${PYTHON_USEDEP}] )
-	"
-
-DISTUTILS_IN_SOURCE_BUILD=1
-
-PATCHES=( "${FILESDIR}"/${P}-cross-compile.patch )
-
-python_prepare_all() {
-	# avoid replacing PYTHONPATH in tests.
-	sed -i '/sys\.path/d' test.py || die
-
-	distutils-r1_python_prepare_all
-}
-
-python_compile() {
-	if [[ ${EPYTHON} != python3* ]]; then
-		local CFLAGS=${CFLAGS}
-		append-cflags -fno-strict-aliasing
-	fi
-	tc-export PKG_CONFIG
-	distutils-r1_python_compile
-}
-
-python_test() {
-	cp -r -l src/lxml/tests "${BUILD_DIR}"/lib/lxml/ || die
-	cp -r -l src/lxml/html/tests "${BUILD_DIR}"/lib/lxml/html/ || die
-	ln -s "${S}"/doc "${BUILD_DIR}"/ || die
-
-	"${PYTHON}" test.py -vv --all-levels -p || die "Test ${test} fails with ${EPYTHON}"
-}
-
-python_install_all() {
-	if use doc; then
-		local DOCS=( *.txt doc/*.txt )
-		local HTML_DOCS=( doc/html/. )
-	fi
-	use examples && local EXAMPLES=( samples/. )
-
-	distutils-r1_python_install_all
-}
-
-pkg_postinst() {
-	optfeature "Support for BeautifulSoup3 as a parser backend" dev-python/beautifulsoup
-	optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/files/, dev-python/lxml/
@ 2019-11-27  2:18 Patrick McLean
  0 siblings, 0 replies; 11+ messages in thread
From: Patrick McLean @ 2019-11-27  2:18 UTC (permalink / raw
  To: gentoo-commits

commit:     c5d5911800933ea32953fd86b24b66263d378103
Author:     Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Wed Nov 27 01:55:56 2019 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Wed Nov 27 02:18:16 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5d59118

dev-python/lxml-4.4.2: Bump, add pypy3

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 dev-python/lxml/Manifest                          |   1 +
 dev-python/lxml/files/lxml-4.4.2-tests-pypy.patch | 415 ++++++++++++++++++++++
 dev-python/lxml/lxml-4.4.2.ebuild                 |  82 +++++
 3 files changed, 498 insertions(+)

diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
index a5bea7eacb2..10c75f7e227 100644
--- a/dev-python/lxml/Manifest
+++ b/dev-python/lxml/Manifest
@@ -3,3 +3,4 @@ DIST lxml-4.3.3.tar.gz 4378439 BLAKE2B 30c2a29e58951164fbff1c9d23362d46987c86b67
 DIST lxml-4.3.4.tar.gz 2488557 BLAKE2B 5059ea45d3d833955636216a7c096322496882de4592a0d19604885dca8dffbc763afb7dc804b7a34561d0c94dfa2130a61835d6c12b97dc83008e8fa33e098a SHA512 7349cb4805e538da5b11edcb79fcd09ddedf0d52e50273a4e587f209e6b147b50737c45dcfc8eb3ee8e7be8f99769046f704c5fc8c35cee74d5d22ef72d503ed
 DIST lxml-4.4.0.tar.gz 939001 BLAKE2B 9fc473729286e98cd73e4b39d7acf22ccb957dd4b366924dc171a6c89c2e435a3dae771342eb3b143451b0550960cb821430de3e8f6470dc87e3a85efc389314 SHA512 23e7b5157a6520f3e1dab76b023e828a5afe9d0103e2d3ff8fd1a8791000ed8f859e26fe9809676b89d4ef9fa4b27a6f1662a2b0f54e5ae04776643f5b06c0c3
 DIST lxml-4.4.1.tar.gz 939355 BLAKE2B 0e9ebc894ebaa7994ee7ce1491683ff892ceac5dbae6bd90fd4d5ac04ec59d6c85edba37160a605c8c1b38119cdccdc8b97b62dc43f76705d7ebb595410c666c SHA512 08857f5e15d6b4badb8bea96fc7aaf3a02a504f9b87171e01c6ace25250d254691c64661dca8e723824cabac4753c59ffa667ac0b6042506b05e4357389e658c
+DIST lxml-4.4.2.tar.gz 940286 BLAKE2B 28366d1673b356f980cedc64839f070e8166906705bc948af24bba369153accc0a4cea0372e87530227be88a89a0dab4d23308b75fd695f55fdb73e6326aa03b SHA512 af6608df7e47513644b841ecb6291e655122927cb439bd2ae694fd344cf5dca621e3e1ce6b40accc6db9e0c4383b5b3e6c6f9ff19f35c4daf30f119a217113ca

diff --git a/dev-python/lxml/files/lxml-4.4.2-tests-pypy.patch b/dev-python/lxml/files/lxml-4.4.2-tests-pypy.patch
new file mode 100644
index 00000000000..780970897f8
--- /dev/null
+++ b/dev-python/lxml/files/lxml-4.4.2-tests-pypy.patch
@@ -0,0 +1,415 @@
+diff --git a/src/lxml/tests/test_elementtree.py b/src/lxml/tests/test_elementtree.py
+index 435807a5..3999de1f 100644
+--- a/src/lxml/tests/test_elementtree.py
++++ b/src/lxml/tests/test_elementtree.py
+@@ -27,7 +27,7 @@ if this_dir not in sys.path:
+ from common_imports import BytesIO, etree, HelperTestCase
+ from common_imports import ElementTree, cElementTree, ET_VERSION, CET_VERSION
+ from common_imports import filter_by_version, fileInTestDir, canonicalize, tmpfile
+-from common_imports import _str, _bytes, unicode, next, IS_PYTHON2
++from common_imports import _str, _bytes, unicode, next, IS_PYTHON2, IS_PYPY
+ 
+ if cElementTree is not None and (CET_VERSION <= (1,0,7) or sys.version_info[0] >= 3):
+     cElementTree = None
+@@ -2928,6 +2928,7 @@ class _ETreeTestCaseBase(HelperTestCase):
+         self.assertEqual('TEST', root2[0].get('{%s}a' % ns_href))
+ 
+     required_versions_ET['test_register_namespace'] = (1,3)
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_register_namespace(self):
+         # ET 1.3+
+         Element = self.etree.Element
+diff --git a/src/lxml/tests/test_errors.py b/src/lxml/tests/test_errors.py
+index 9dc648eb..1853e546 100644
+--- a/src/lxml/tests/test_errors.py
++++ b/src/lxml/tests/test_errors.py
+@@ -13,7 +13,7 @@ this_dir = os.path.dirname(__file__)
+ if this_dir not in sys.path:
+     sys.path.insert(0, this_dir) # needed for Py3
+ 
+-from common_imports import HelperTestCase
++from common_imports import HelperTestCase, IS_PYPY
+ 
+ 
+ class ErrorTestCase(HelperTestCase):
+@@ -27,6 +27,7 @@ class ErrorTestCase(HelperTestCase):
+     def test_empty_parse(self):
+         self.assertRaises(etree.XMLSyntaxError, etree.fromstring, '')
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_element_cyclic_gc_none(self):
+         # test if cyclic reference can crash etree
+         Element = self.etree.Element
+diff --git a/src/lxml/tests/test_http_io.py b/src/lxml/tests/test_http_io.py
+index d058fad2..b905fdfb 100644
+--- a/src/lxml/tests/test_http_io.py
++++ b/src/lxml/tests/test_http_io.py
+@@ -17,10 +17,11 @@ if this_dir not in sys.path:
+     sys.path.insert(0, this_dir)  # needed for Py3
+ 
+ from .common_imports import (
+-    etree, HelperTestCase, BytesIO, _bytes)
++    etree, HelperTestCase, BytesIO, _bytes, IS_PYPY)
+ from .dummy_http_server import webserver, HTTPRequestCollector
+ 
+ 
++@unittest.skipIf(IS_PYPY, "broken on pypy")
+ class HttpIOTestCase(HelperTestCase):
+     etree = etree
+ 
+diff --git a/src/lxml/tests/test_nsclasses.py b/src/lxml/tests/test_nsclasses.py
+index b8b41063..e8d275b9 100644
+--- a/src/lxml/tests/test_nsclasses.py
++++ b/src/lxml/tests/test_nsclasses.py
+@@ -12,7 +12,7 @@ if this_dir not in sys.path:
+     sys.path.insert(0, this_dir) # needed for Py3
+ 
+ from common_imports import etree, HelperTestCase, _bytes
+-from common_imports import doctest, make_doctest
++from common_imports import doctest, make_doctest, IS_PYPY
+ 
+ class ETreeNamespaceClassesTestCase(HelperTestCase):
+     
+@@ -49,6 +49,7 @@ class ETreeNamespaceClassesTestCase(HelperTestCase):
+         self.Namespace('ns02').clear()
+         self.Namespace('ns03').clear()
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_ns_classes(self):
+         bluff_dict = {'bluff' : self.bluff_class}
+         maeh_dict  = {'maeh'  : self.maeh_class}
+diff --git a/src/lxml/tests/test_objectify.py b/src/lxml/tests/test_objectify.py
+index 78035d04..45e73d97 100644
+--- a/src/lxml/tests/test_objectify.py
++++ b/src/lxml/tests/test_objectify.py
+@@ -13,7 +13,7 @@ if this_dir not in sys.path:
+ 
+ from common_imports import etree, HelperTestCase, fileInTestDir
+ from common_imports import SillyFileLike, canonicalize, doctest, make_doctest
+-from common_imports import _bytes, _str, StringIO, BytesIO
++from common_imports import _bytes, _str, StringIO, BytesIO, IS_PYPY
+ 
+ from lxml import objectify
+ 
+@@ -216,11 +216,13 @@ class ObjectifyTestCase(HelperTestCase):
+         expected.update(DEFAULT_NSMAP)
+         self.assertEqual(root.value.nsmap, expected)
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_date_element_efactory_text(self):
+         # ObjectifiedDataElement can also be used as E-Factory
+         value = objectify.ObjectifiedDataElement('test', 'toast')
+         self.assertEqual(value.text, 'testtoast')
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_date_element_efactory_tail(self):
+         # ObjectifiedDataElement can also be used as E-Factory
+         value = objectify.ObjectifiedElement(objectify.ObjectifiedDataElement(), 'test', 'toast')
+@@ -377,6 +379,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertEqual("4", getattr(root.c1, "{}c2").text)
+         self.assertEqual("0", getattr(root.c1, "c2").text)
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_setattr(self):
+         for val in [
+             2, 2**32, 1.2, "Won't get fooled again", 
+@@ -812,6 +815,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertEqual(3, len(root.findall(".//b")))
+         self.assertEqual(2, len(root.findall("b")))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_build_tree(self):
+         root = self.Element('root')
+         root.a = 5
+@@ -841,6 +845,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertEqual(value, None)
+         self.assertEqual(value.get(XML_SCHEMA_NIL_ATTR), "true")
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_bool(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -874,6 +879,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertTrue(isinstance(value, objectify.BoolElement))
+         self.assertEqual(value, False)
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_str(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -881,6 +887,7 @@ class ObjectifyTestCase(HelperTestCase):
+         root.s = "test"
+         self.assertTrue(isinstance(root.s, objectify.StringElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_str_intliteral(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -888,6 +895,7 @@ class ObjectifyTestCase(HelperTestCase):
+         root.s = "3"
+         self.assertTrue(isinstance(root.s, objectify.StringElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_str_floatliteral(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -895,6 +903,7 @@ class ObjectifyTestCase(HelperTestCase):
+         root.s = "3.72"
+         self.assertTrue(isinstance(root.s, objectify.StringElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_str_mul(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -907,6 +916,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertRaises(TypeError, operator.mul, root.s, "honk")
+         self.assertRaises(TypeError, operator.mul, "honk", root.s)
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_str_add(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -917,6 +927,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertEqual("test" + s, root.s + s)
+         self.assertEqual(s + "test", s + root.s)
+             
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_str_mod(self):
+         s = "%d %f %s %r"
+         el = objectify.DataElement(s)
+@@ -982,6 +993,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertTrue(isinstance(value, objectify.StringElement))
+         self.assertEqual(value, "3.20")
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_ustr(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -989,6 +1001,7 @@ class ObjectifyTestCase(HelperTestCase):
+         root.s = _str("test")
+         self.assertTrue(isinstance(root.s, objectify.StringElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_ustr_intliteral(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -996,6 +1009,7 @@ class ObjectifyTestCase(HelperTestCase):
+         root.s = _str("3")
+         self.assertTrue(isinstance(root.s, objectify.StringElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_ustr_floatliteral(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -1003,6 +1017,7 @@ class ObjectifyTestCase(HelperTestCase):
+         root.s = _str("3.72")
+         self.assertTrue(isinstance(root.s, objectify.StringElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_ustr_mul(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -1015,6 +1030,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertRaises(TypeError, operator.mul, root.s, _str("honk"))
+         self.assertRaises(TypeError, operator.mul, _str("honk"), root.s)
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_ustr_add(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -1040,6 +1056,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertTrue(isinstance(value, objectify.StringElement))
+         self.assertEqual(value, _str("3.20"))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_int(self):
+         Element = self.Element
+         root = Element("{objectified}root")
+@@ -1056,6 +1073,7 @@ class ObjectifyTestCase(HelperTestCase):
+         value = objectify.DataElement(123)
+         self.assertEqual(hash(value), hash(123))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_float(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -1072,6 +1090,7 @@ class ObjectifyTestCase(HelperTestCase):
+         value = objectify.DataElement(5.5)
+         self.assertEqual(hash(value), hash(5.5))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_float_precision(self):
+         # test not losing precision by shortened float str() value
+         # repr(2.305064300557): '2.305064300557'
+@@ -1091,6 +1110,7 @@ class ObjectifyTestCase(HelperTestCase):
+         s = "2.305064300557"
+         self.assertEqual(objectify.FloatElement(s), float(s))
+   
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_float_precision_consistency(self):
+         # test consistent FloatElement values for the different instantiation
+         # possibilities
+@@ -1172,6 +1192,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertEqual(value.text, None)
+         self.assertEqual(value.pyval, None)
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_unregistered(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -1334,6 +1355,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertEqual(["why", "try"],
+                           strs)
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_str_cmp(self):
+         XML = self.XML
+         root = XML(_bytes('<root><b>test</b><b>taste</b><b></b><b/></root>'))
+@@ -1361,6 +1383,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertEqual(root.b, "")
+         self.assertEqual("", root.b)
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_int_cmp(self):
+         XML = self.XML
+         root = XML(_bytes('<root><b>5</b><b>6</b></root>'))
+@@ -1383,6 +1406,7 @@ class ObjectifyTestCase(HelperTestCase):
+         
+     # float + long share the NumberElement implementation with int
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_bool_cmp(self):
+         XML = self.XML
+         root = XML(_bytes('<root><b>false</b><b>true</b></root>'))
+@@ -2052,6 +2076,7 @@ class ObjectifyTestCase(HelperTestCase):
+                           before = [objectify.getRegisteredTypes()[0].name],
+                           after  = [objectify.getRegisteredTypes()[1].name])
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_registered_type_stringify(self):
+         from datetime import datetime
+         def parse_date(value):
+@@ -2522,46 +2547,55 @@ class ObjectifyTestCase(HelperTestCase):
+ 
+     # E-Factory tests, need to use sub-elements as root element is always
+     # type-looked-up as ObjectifiedElement (no annotations)
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_efactory_int(self):
+         E = objectify.E
+         root = E.root(E.val(23))
+         self.assertTrue(isinstance(root.val, objectify.IntElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_efactory_float(self):
+         E = objectify.E
+         root = E.root(E.val(233.23))
+         self.assertTrue(isinstance(root.val, objectify.FloatElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_efactory_str(self):
+         E = objectify.E
+         root = E.root(E.val("what?"))
+         self.assertTrue(isinstance(root.val, objectify.StringElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_efactory_unicode(self):
+         E = objectify.E
+         root = E.root(E.val(_str("blöödy häll", encoding="ISO-8859-1")))
+         self.assertTrue(isinstance(root.val, objectify.StringElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_efactory_bool(self):
+         E = objectify.E
+         root = E.root(E.val(True))
+         self.assertTrue(isinstance(root.val, objectify.BoolElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_efactory_none(self):
+         E = objectify.E
+         root = E.root(E.val(None))
+         self.assertTrue(isinstance(root.val, objectify.NoneElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_efactory_value_concatenation(self):
+         E = objectify.E
+         root = E.root(E.val(1, "foo", 2.0, "bar ", True, None))
+         self.assertTrue(isinstance(root.val, objectify.StringElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_efactory_attrib(self):
+         E = objectify.E
+         root = E.root(foo="bar")
+         self.assertEqual(root.get("foo"), "bar")
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_efactory_nested(self):
+         E = objectify.E
+         DataElement = objectify.DataElement
+@@ -2576,6 +2610,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertTrue(isinstance(root.value[0], objectify.IntElement))
+         self.assertTrue(isinstance(root.value[1], objectify.FloatElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_efactory_subtype(self):
+         class Attribute(objectify.ObjectifiedDataElement):
+             def __init__(self):
+@@ -2677,7 +2712,8 @@ def test_suite():
+     suite = unittest.TestSuite()
+     suite.addTests([unittest.makeSuite(ObjectifyTestCase)])
+     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
+ 
+ if __name__ == '__main__':
+diff --git a/src/lxml/tests/test_xpathevaluator.py b/src/lxml/tests/test_xpathevaluator.py
+index a2df6ddb..0951d5e1 100644
+--- a/src/lxml/tests/test_xpathevaluator.py
++++ b/src/lxml/tests/test_xpathevaluator.py
+@@ -11,7 +11,7 @@ if this_dir not in sys.path:
+     sys.path.insert(0, this_dir) # needed for Py3
+ 
+ from common_imports import etree, HelperTestCase, _bytes, BytesIO
+-from common_imports import doctest, make_doctest
++from common_imports import doctest, make_doctest, IS_PYPY
+ 
+ class ETreeXPathTestCase(HelperTestCase):
+     """XPath tests etree"""
+@@ -742,8 +742,9 @@ def test_suite():
+         suite.addTests([unittest.makeSuite(ETreeXPathExsltTestCase)])
+     suite.addTests([unittest.makeSuite(ETreeETXPathClassTestCase)])
+     suite.addTests([doctest.DocTestSuite()])
+-    suite.addTests(
+-        [make_doctest('../../../doc/xpathxslt.txt')])
++    if not IS_PYPY:
++        suite.addTests(
++            [make_doctest('../../../doc/xpathxslt.txt')])
+     return suite
+ 
+ if __name__ == '__main__':
+diff --git a/src/lxml/tests/test_xslt.py b/src/lxml/tests/test_xslt.py
+index 08d03514..b81716c5 100644
+--- a/src/lxml/tests/test_xslt.py
++++ b/src/lxml/tests/test_xslt.py
+@@ -19,6 +19,8 @@ if this_dir not in sys.path:
+     sys.path.insert(0, this_dir) # needed for Py3
+ 
+ is_python3 = sys.version_info[0] >= 3
++is_pypy = (getattr(sys, 'implementation', None) == 'pypy' or
++           getattr(sys, 'pypy_version_info', None) is not None)
+ 
+ try:
+     unicode
+@@ -2085,8 +2087,9 @@ def test_suite():
+         suite.addTests([unittest.makeSuite(Py3XSLTTestCase)])
+     suite.addTests(
+         [make_doctest('../../../doc/extensions.txt')])
+-    suite.addTests(
+-        [make_doctest('../../../doc/xpathxslt.txt')])
++    if not is_pypy:
++        suite.addTests(
++            [make_doctest('../../../doc/xpathxslt.txt')])
+     return suite
+ 
+ if __name__ == '__main__':

diff --git a/dev-python/lxml/lxml-4.4.2.ebuild b/dev-python/lxml/lxml-4.4.2.ebuild
new file mode 100644
index 00000000000..03335ffe1d8
--- /dev/null
+++ b/dev-python/lxml/lxml-4.4.2.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{5,6,7,8} pypy{,3} )
+
+inherit distutils-r1 eutils 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"
+
+LICENSE="BSD ElementTree GPL-2 PSF-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc examples +threads test"
+RESTRICT="!test? ( test )"
+
+# Note: lib{xml2,xslt} are used as C libraries, not Python modules.
+RDEPEND="
+	>=dev-libs/libxml2-2.9.5
+	>=dev-libs/libxslt-1.1.28"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	virtual/pkgconfig
+	$(python_gen_cond_dep 'dev-python/cython[${PYTHON_USEDEP}]' python2_7 'python3*')
+	dev-python/setuptools[${PYTHON_USEDEP}]
+	test? ( dev-python/cssselect[${PYTHON_USEDEP}] )
+	"
+
+DISTUTILS_IN_SOURCE_BUILD=1
+S=${WORKDIR}/lxml-${P}
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.5.0-cross-compile.patch
+	"${FILESDIR}"/${PN}-4.4.2-tests-pypy.patch
+)
+
+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() {
+	if ! python_is_python3; then
+		local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
+	fi
+	tc-export PKG_CONFIG
+	distutils-r1_python_compile
+}
+
+python_test() {
+	cp -r -l src/lxml/tests "${BUILD_DIR}"/lib/lxml/ || die
+	cp -r -l src/lxml/html/tests "${BUILD_DIR}"/lib/lxml/html/ || die
+	ln -s "${S}"/doc "${BUILD_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/beautifulsoup
+	optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/files/, dev-python/lxml/
@ 2020-10-17 19:01 Michał Górny
  0 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2020-10-17 19:01 UTC (permalink / raw
  To: gentoo-commits

commit:     d909b314066cb21535a7e8bd1f314452481871e7
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 17 14:15:45 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Oct 17 19:01:20 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d909b314

dev-python/lxml: Bump to 4.6.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/lxml/Manifest                          |   1 +
 dev-python/lxml/files/lxml-4.6.0-tests-pypy.patch | 434 ++++++++++++++++++++++
 dev-python/lxml/lxml-4.6.0.ebuild                 |  81 ++++
 3 files changed, 516 insertions(+)

diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
index d8a2572ecb2..bc39d47f191 100644
--- a/dev-python/lxml/Manifest
+++ b/dev-python/lxml/Manifest
@@ -1 +1,2 @@
 DIST lxml-4.5.2.tar.gz 943480 BLAKE2B 11130d2507ff0d61637d7fef2f4b28c5fbbbfe8864504c8f3a231899be4db14e6be65edc6e780719686605663b0c5f76f161beb509dc58d16ee3a9158a7db59c SHA512 146dcb4414b7f0815c5930048d9dc89711bf0a3ee091c89f4475265cdd6f1690a20f82ec24a282a43cff8854f9b960f0cd4430cff79a7506d39ac1baf7770695
+DIST lxml-4.6.0.tar.gz 946217 BLAKE2B c13fa89d1e534d801bcd711850a41f20634d80690d23868904fe5b9e9b42132928345604582a6fc502555adf449b3dc1baed6c9e7a35c7d66af0b9c496facc2f SHA512 b92403b68babac8112ec87989909eb03b75ad365bcd938daef11f4768e95d9bc7a53dae90882d22eeb51bc1a04ae47f8deac504e426b1751826575280655c19e

diff --git a/dev-python/lxml/files/lxml-4.6.0-tests-pypy.patch b/dev-python/lxml/files/lxml-4.6.0-tests-pypy.patch
new file mode 100644
index 00000000000..bd17a8e06e1
--- /dev/null
+++ b/dev-python/lxml/files/lxml-4.6.0-tests-pypy.patch
@@ -0,0 +1,434 @@
+From 1804702b5e3c85c1a16014d62365a29d0a6d0c75 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Thu, 30 Jan 2020 06:15:27 +0100
+Subject: [PATCH] Skip tests failing on PyPy
+
+---
+ src/lxml/tests/test_elementtree.py    |  3 +-
+ src/lxml/tests/test_errors.py         |  3 +-
+ src/lxml/tests/test_http_io.py        |  3 +-
+ src/lxml/tests/test_nsclasses.py      |  3 +-
+ src/lxml/tests/test_objectify.py      | 41 +++++++++++++++++++++++++--
+ src/lxml/tests/test_xpathevaluator.py |  7 +++--
+ src/lxml/tests/test_xslt.py           |  7 +++--
+ 7 files changed, 56 insertions(+), 11 deletions(-)
+
+diff --git a/src/lxml/tests/test_elementtree.py b/src/lxml/tests/test_elementtree.py
+index 78d8964d..f3f28044 100644
+--- a/src/lxml/tests/test_elementtree.py
++++ b/src/lxml/tests/test_elementtree.py
+@@ -26,7 +26,7 @@ from .common_imports import (
+     BytesIO, etree, HelperTestCase,
+     ElementTree, cElementTree, ET_VERSION, CET_VERSION,
+     filter_by_version, fileInTestDir, canonicalize, tmpfile,
+-    _str, _bytes, unicode, IS_PYTHON2
++    _str, _bytes, unicode, IS_PYTHON2, IS_PYPY
+ )
+ 
+ if cElementTree is not None and (CET_VERSION <= (1,0,7) or sys.version_info[0] >= 3):
+@@ -2956,6 +2956,7 @@ class _ETreeTestCaseBase(HelperTestCase):
+         self.assertEqual('TEST', root2[0].get('{%s}a' % ns_href))
+ 
+     required_versions_ET['test_register_namespace'] = (1,3)
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_register_namespace(self):
+         # ET 1.3+
+         Element = self.etree.Element
+diff --git a/src/lxml/tests/test_errors.py b/src/lxml/tests/test_errors.py
+index c0aee744..33111429 100644
+--- a/src/lxml/tests/test_errors.py
++++ b/src/lxml/tests/test_errors.py
+@@ -11,7 +11,7 @@ import unittest
+ import sys, gc, os.path
+ from lxml import etree
+ 
+-from .common_imports import HelperTestCase
++from .common_imports import HelperTestCase, IS_PYPY
+ 
+ 
+ class ErrorTestCase(HelperTestCase):
+@@ -25,6 +25,7 @@ class ErrorTestCase(HelperTestCase):
+     def test_empty_parse(self):
+         self.assertRaises(etree.XMLSyntaxError, etree.fromstring, '')
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_element_cyclic_gc_none(self):
+         # test if cyclic reference can crash etree
+         Element = self.etree.Element
+diff --git a/src/lxml/tests/test_http_io.py b/src/lxml/tests/test_http_io.py
+index f9eff39a..edf2bd81 100644
+--- a/src/lxml/tests/test_http_io.py
++++ b/src/lxml/tests/test_http_io.py
+@@ -11,10 +11,11 @@ import textwrap
+ import sys
+ 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
+ 
+ 
++@unittest.skipIf(IS_PYPY, "broken on pypy")
+ class HttpIOTestCase(HelperTestCase):
+     etree = etree
+ 
+diff --git a/src/lxml/tests/test_nsclasses.py b/src/lxml/tests/test_nsclasses.py
+index a0aa608d..5aa5dc48 100644
+--- a/src/lxml/tests/test_nsclasses.py
++++ b/src/lxml/tests/test_nsclasses.py
+@@ -9,7 +9,7 @@ from __future__ import absolute_import
+ 
+ import unittest
+ 
+-from .common_imports import etree, HelperTestCase, _bytes, make_doctest
++from .common_imports import etree, HelperTestCase, _bytes, make_doctest, IS_PYPY
+ 
+ class ETreeNamespaceClassesTestCase(HelperTestCase):
+     
+@@ -46,6 +46,7 @@ class ETreeNamespaceClassesTestCase(HelperTestCase):
+         self.Namespace('ns02').clear()
+         self.Namespace('ns03').clear()
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_ns_classes(self):
+         bluff_dict = {'bluff' : self.bluff_class}
+         maeh_dict  = {'maeh'  : self.maeh_class}
+diff --git a/src/lxml/tests/test_objectify.py b/src/lxml/tests/test_objectify.py
+index a12ae7e1..83ba4ced 100644
+--- a/src/lxml/tests/test_objectify.py
++++ b/src/lxml/tests/test_objectify.py
+@@ -9,7 +9,8 @@ from __future__ import absolute_import
+ import unittest, operator
+ 
+ from .common_imports import (
+-    etree, HelperTestCase, fileInTestDir, doctest, make_doctest, _bytes, _str, BytesIO
++    etree, HelperTestCase, fileInTestDir, doctest, make_doctest, _bytes, _str, BytesIO,
++    IS_PYPY
+ )
+ 
+ from lxml import objectify
+@@ -213,11 +214,13 @@ class ObjectifyTestCase(HelperTestCase):
+         expected.update(DEFAULT_NSMAP)
+         self.assertEqual(root.value.nsmap, expected)
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_date_element_efactory_text(self):
+         # ObjectifiedDataElement can also be used as E-Factory
+         value = objectify.ObjectifiedDataElement('test', 'toast')
+         self.assertEqual(value.text, 'testtoast')
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_date_element_efactory_tail(self):
+         # ObjectifiedDataElement can also be used as E-Factory
+         value = objectify.ObjectifiedElement(objectify.ObjectifiedDataElement(), 'test', 'toast')
+@@ -374,6 +377,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertEqual("4", getattr(root.c1, "{}c2").text)
+         self.assertEqual("0", getattr(root.c1, "c2").text)
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_setattr(self):
+         for val in [
+             2, 2**32, 1.2, "Won't get fooled again", 
+@@ -809,6 +813,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertEqual(3, len(root.findall(".//b")))
+         self.assertEqual(2, len(root.findall("b")))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_build_tree(self):
+         root = self.Element('root')
+         root.a = 5
+@@ -838,6 +843,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertEqual(value, None)
+         self.assertEqual(value.get(XML_SCHEMA_NIL_ATTR), "true")
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_bool(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -871,6 +877,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertTrue(isinstance(value, objectify.BoolElement))
+         self.assertEqual(value, False)
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_str(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -878,6 +885,7 @@ class ObjectifyTestCase(HelperTestCase):
+         root.s = "test"
+         self.assertTrue(isinstance(root.s, objectify.StringElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_str_intliteral(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -885,6 +893,7 @@ class ObjectifyTestCase(HelperTestCase):
+         root.s = "3"
+         self.assertTrue(isinstance(root.s, objectify.StringElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_str_floatliteral(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -892,6 +901,7 @@ class ObjectifyTestCase(HelperTestCase):
+         root.s = "3.72"
+         self.assertTrue(isinstance(root.s, objectify.StringElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_str_mul(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -904,6 +914,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertRaises(TypeError, operator.mul, root.s, "honk")
+         self.assertRaises(TypeError, operator.mul, "honk", root.s)
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_str_add(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -914,6 +925,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertEqual("test" + s, root.s + s)
+         self.assertEqual(s + "test", s + root.s)
+             
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_str_mod(self):
+         s = "%d %f %s %r"
+         el = objectify.DataElement(s)
+@@ -979,6 +991,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertTrue(isinstance(value, objectify.StringElement))
+         self.assertEqual(value, "3.20")
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_ustr(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -986,6 +999,7 @@ class ObjectifyTestCase(HelperTestCase):
+         root.s = _str("test")
+         self.assertTrue(isinstance(root.s, objectify.StringElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_ustr_intliteral(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -993,6 +1007,7 @@ class ObjectifyTestCase(HelperTestCase):
+         root.s = _str("3")
+         self.assertTrue(isinstance(root.s, objectify.StringElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_ustr_floatliteral(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -1000,6 +1015,7 @@ class ObjectifyTestCase(HelperTestCase):
+         root.s = _str("3.72")
+         self.assertTrue(isinstance(root.s, objectify.StringElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_ustr_mul(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -1012,6 +1028,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertRaises(TypeError, operator.mul, root.s, _str("honk"))
+         self.assertRaises(TypeError, operator.mul, _str("honk"), root.s)
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_ustr_add(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -1037,6 +1054,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertTrue(isinstance(value, objectify.StringElement))
+         self.assertEqual(value, _str("3.20"))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_int(self):
+         Element = self.Element
+         root = Element("{objectified}root")
+@@ -1053,6 +1071,7 @@ class ObjectifyTestCase(HelperTestCase):
+         value = objectify.DataElement(123)
+         self.assertEqual(hash(value), hash(123))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_float(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -1069,6 +1088,7 @@ class ObjectifyTestCase(HelperTestCase):
+         value = objectify.DataElement(5.5)
+         self.assertEqual(hash(value), hash(5.5))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_float_precision(self):
+         # test not losing precision by shortened float str() value
+         # repr(2.305064300557): '2.305064300557'
+@@ -1088,6 +1108,7 @@ class ObjectifyTestCase(HelperTestCase):
+         s = "2.305064300557"
+         self.assertEqual(objectify.FloatElement(s), float(s))
+   
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_float_precision_consistency(self):
+         # test consistent FloatElement values for the different instantiation
+         # possibilities
+@@ -1169,6 +1190,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertEqual(value.text, None)
+         self.assertEqual(value.pyval, None)
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_unregistered(self):
+         Element = self.Element
+         SubElement = self.etree.SubElement
+@@ -1331,6 +1353,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertEqual(["why", "try"],
+                           strs)
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_str_cmp(self):
+         XML = self.XML
+         root = XML(_bytes('<root><b>test</b><b>taste</b><b></b><b/></root>'))
+@@ -1358,6 +1381,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertEqual(root.b, "")
+         self.assertEqual("", root.b)
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_int_cmp(self):
+         XML = self.XML
+         root = XML(_bytes('<root><b>5</b><b>6</b></root>'))
+@@ -1380,6 +1404,7 @@ class ObjectifyTestCase(HelperTestCase):
+         
+     # float + long share the NumberElement implementation with int
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_type_bool_cmp(self):
+         XML = self.XML
+         root = XML(_bytes('<root><b>false</b><b>true</b></root>'))
+@@ -2049,6 +2074,7 @@ class ObjectifyTestCase(HelperTestCase):
+                           before = [objectify.getRegisteredTypes()[0].name],
+                           after  = [objectify.getRegisteredTypes()[1].name])
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_registered_type_stringify(self):
+         from datetime import datetime
+         def parse_date(value):
+@@ -2519,46 +2545,55 @@ class ObjectifyTestCase(HelperTestCase):
+ 
+     # E-Factory tests, need to use sub-elements as root element is always
+     # type-looked-up as ObjectifiedElement (no annotations)
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_efactory_int(self):
+         E = objectify.E
+         root = E.root(E.val(23))
+         self.assertTrue(isinstance(root.val, objectify.IntElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_efactory_float(self):
+         E = objectify.E
+         root = E.root(E.val(233.23))
+         self.assertTrue(isinstance(root.val, objectify.FloatElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_efactory_str(self):
+         E = objectify.E
+         root = E.root(E.val("what?"))
+         self.assertTrue(isinstance(root.val, objectify.StringElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_efactory_unicode(self):
+         E = objectify.E
+         root = E.root(E.val(_str("blöödy häll", encoding="ISO-8859-1")))
+         self.assertTrue(isinstance(root.val, objectify.StringElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_efactory_bool(self):
+         E = objectify.E
+         root = E.root(E.val(True))
+         self.assertTrue(isinstance(root.val, objectify.BoolElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_efactory_none(self):
+         E = objectify.E
+         root = E.root(E.val(None))
+         self.assertTrue(isinstance(root.val, objectify.NoneElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_efactory_value_concatenation(self):
+         E = objectify.E
+         root = E.root(E.val(1, "foo", 2.0, "bar ", True, None))
+         self.assertTrue(isinstance(root.val, objectify.StringElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_efactory_attrib(self):
+         E = objectify.E
+         root = E.root(foo="bar")
+         self.assertEqual(root.get("foo"), "bar")
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_efactory_nested(self):
+         E = objectify.E
+         DataElement = objectify.DataElement
+@@ -2573,6 +2608,7 @@ class ObjectifyTestCase(HelperTestCase):
+         self.assertTrue(isinstance(root.value[0], objectify.IntElement))
+         self.assertTrue(isinstance(root.value[1], objectify.FloatElement))
+ 
++    @unittest.skipIf(IS_PYPY, "broken on pypy")
+     def test_efactory_subtype(self):
+         class Attribute(objectify.ObjectifiedDataElement):
+             def __init__(self):
+@@ -2674,7 +2710,8 @@ def test_suite():
+     suite = unittest.TestSuite()
+     suite.addTests([unittest.makeSuite(ObjectifyTestCase)])
+     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
+ 
+ if __name__ == '__main__':
+diff --git a/src/lxml/tests/test_xpathevaluator.py b/src/lxml/tests/test_xpathevaluator.py
+index 13ee97ec..6d162c6d 100644
+--- a/src/lxml/tests/test_xpathevaluator.py
++++ b/src/lxml/tests/test_xpathevaluator.py
+@@ -8,7 +8,7 @@ from __future__ import absolute_import
+ 
+ import unittest, sys
+ 
+-from .common_imports import etree, HelperTestCase, _bytes, BytesIO, doctest, make_doctest
++from .common_imports import etree, HelperTestCase, _bytes, BytesIO, doctest, make_doctest, IS_PYPY
+ 
+ 
+ class ETreeXPathTestCase(HelperTestCase):
+@@ -740,8 +740,9 @@ def test_suite():
+         suite.addTests([unittest.makeSuite(ETreeXPathExsltTestCase)])
+     suite.addTests([unittest.makeSuite(ETreeETXPathClassTestCase)])
+     suite.addTests([doctest.DocTestSuite()])
+-    suite.addTests(
+-        [make_doctest('../../../doc/xpathxslt.txt')])
++    if not IS_PYPY:
++        suite.addTests(
++            [make_doctest('../../../doc/xpathxslt.txt')])
+     return suite
+ 
+ if __name__ == '__main__':
+diff --git a/src/lxml/tests/test_xslt.py b/src/lxml/tests/test_xslt.py
+index cde23357..41f8d78b 100644
+--- a/src/lxml/tests/test_xslt.py
++++ b/src/lxml/tests/test_xslt.py
+@@ -17,6 +17,8 @@ from textwrap import dedent
+ from tempfile import NamedTemporaryFile, mkdtemp
+ 
+ is_python3 = sys.version_info[0] >= 3
++is_pypy = (getattr(sys, 'implementation', None) == 'pypy' or
++           getattr(sys, 'pypy_version_info', None) is not None)
+ 
+ try:
+     unicode
+@@ -2085,8 +2087,9 @@ def test_suite():
+         suite.addTests([unittest.makeSuite(Py3XSLTTestCase)])
+     suite.addTests(
+         [make_doctest('../../../doc/extensions.txt')])
+-    suite.addTests(
+-        [make_doctest('../../../doc/xpathxslt.txt')])
++    if not is_pypy:
++        suite.addTests(
++            [make_doctest('../../../doc/xpathxslt.txt')])
+     return suite
+ 
+ if __name__ == '__main__':
+-- 
+2.25.0
+

diff --git a/dev-python/lxml/lxml-4.6.0.ebuild b/dev-python/lxml/lxml-4.6.0.ebuild
new file mode 100644
index 00000000000..f2212f18627
--- /dev/null
+++ b/dev-python/lxml/lxml-4.6.0.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8,9} 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"
+S=${WORKDIR}/lxml-${P}
+
+LICENSE="BSD ElementTree GPL-2 PSF-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc examples +threads test"
+RESTRICT="!test? ( test )"
+
+# Note: lib{xml2,xslt} are used as C libraries, not Python modules.
+RDEPEND="
+	>=dev-libs/libxml2-2.9.5
+	>=dev-libs/libxslt-1.1.28"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	virtual/pkgconfig
+	dev-python/cython[${PYTHON_USEDEP}]
+	dev-python/setuptools[${PYTHON_USEDEP}]
+	test? ( dev-python/cssselect[${PYTHON_USEDEP}] )
+	"
+
+DISTUTILS_IN_SOURCE_BUILD=1
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-4.6.0-tests-pypy.patch
+)
+
+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() {
+	if ! python_is_python3; then
+		local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
+	fi
+	tc-export PKG_CONFIG
+	distutils-r1_python_compile
+}
+
+python_test() {
+	cp -r -l src/lxml/tests "${BUILD_DIR}"/lib/lxml/ || die
+	cp -r -l src/lxml/html/tests "${BUILD_DIR}"/lib/lxml/html/ || die
+	ln -s "${S}"/doc "${BUILD_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/beautifulsoup
+	optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/files/, dev-python/lxml/
@ 2020-11-27  8:43 Michał Górny
  0 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2020-11-27  8:43 UTC (permalink / raw
  To: gentoo-commits

commit:     59cc5f5c5b07a139ae52e64ff321d2604e74e1f0
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 27 08:32:13 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Nov 27 08:43:51 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59cc5f5c

dev-python/lxml: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/lxml/Manifest                          |   1 -
 dev-python/lxml/files/lxml-4.5.0-tests-pypy.patch | 434 ----------------------
 dev-python/lxml/lxml-4.5.2-r1.ebuild              |  81 ----
 3 files changed, 516 deletions(-)

diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
index 3cc420ca077..bd0cc0f939d 100644
--- a/dev-python/lxml/Manifest
+++ b/dev-python/lxml/Manifest
@@ -1,2 +1 @@
-DIST lxml-4.5.2.tar.gz 943480 BLAKE2B 11130d2507ff0d61637d7fef2f4b28c5fbbbfe8864504c8f3a231899be4db14e6be65edc6e780719686605663b0c5f76f161beb509dc58d16ee3a9158a7db59c SHA512 146dcb4414b7f0815c5930048d9dc89711bf0a3ee091c89f4475265cdd6f1690a20f82ec24a282a43cff8854f9b960f0cd4430cff79a7506d39ac1baf7770695
 DIST lxml-4.6.1.tar.gz 946461 BLAKE2B b1ea8e15af1130b9f9683614bbc2480ec5008ad697f70536a332c1faf4bda4aa9525b2ef5d82d32c415c91e47ab54c7b3cb644e9a2933517946c3fc8ab7ec7c5 SHA512 3cc917e7535ac1be3db8939f72846313267c8b1f0adccc92a2155a160ed7299d0def718bdae1379e42398ca1b959b1130505597febca00f02cb87c8666f1f1c3

diff --git a/dev-python/lxml/files/lxml-4.5.0-tests-pypy.patch b/dev-python/lxml/files/lxml-4.5.0-tests-pypy.patch
deleted file mode 100644
index 5f8cad9063f..00000000000
--- a/dev-python/lxml/files/lxml-4.5.0-tests-pypy.patch
+++ /dev/null
@@ -1,434 +0,0 @@
-From 1804702b5e3c85c1a16014d62365a29d0a6d0c75 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Thu, 30 Jan 2020 06:15:27 +0100
-Subject: [PATCH] Skip tests failing on PyPy
-
----
- src/lxml/tests/test_elementtree.py    |  3 +-
- src/lxml/tests/test_errors.py         |  3 +-
- src/lxml/tests/test_http_io.py        |  3 +-
- src/lxml/tests/test_nsclasses.py      |  3 +-
- src/lxml/tests/test_objectify.py      | 41 +++++++++++++++++++++++++--
- src/lxml/tests/test_xpathevaluator.py |  7 +++--
- src/lxml/tests/test_xslt.py           |  7 +++--
- 7 files changed, 56 insertions(+), 11 deletions(-)
-
-diff --git a/src/lxml/tests/test_elementtree.py b/src/lxml/tests/test_elementtree.py
-index 78d8964d..f3f28044 100644
---- a/src/lxml/tests/test_elementtree.py
-+++ b/src/lxml/tests/test_elementtree.py
-@@ -26,7 +26,7 @@ from .common_imports import (
-     BytesIO, etree, HelperTestCase,
-     ElementTree, cElementTree, ET_VERSION, CET_VERSION,
-     filter_by_version, fileInTestDir, canonicalize, tmpfile,
--    _str, _bytes, unicode, next, IS_PYTHON2
-+    _str, _bytes, unicode, next, IS_PYTHON2, IS_PYPY
- )
- 
- if cElementTree is not None and (CET_VERSION <= (1,0,7) or sys.version_info[0] >= 3):
-@@ -2956,6 +2956,7 @@ class _ETreeTestCaseBase(HelperTestCase):
-         self.assertEqual('TEST', root2[0].get('{%s}a' % ns_href))
- 
-     required_versions_ET['test_register_namespace'] = (1,3)
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_register_namespace(self):
-         # ET 1.3+
-         Element = self.etree.Element
-diff --git a/src/lxml/tests/test_errors.py b/src/lxml/tests/test_errors.py
-index c0aee744..33111429 100644
---- a/src/lxml/tests/test_errors.py
-+++ b/src/lxml/tests/test_errors.py
-@@ -11,7 +11,7 @@ import unittest
- import sys, gc, os.path
- from lxml import etree
- 
--from .common_imports import HelperTestCase
-+from .common_imports import HelperTestCase, IS_PYPY
- 
- 
- class ErrorTestCase(HelperTestCase):
-@@ -25,6 +25,7 @@ class ErrorTestCase(HelperTestCase):
-     def test_empty_parse(self):
-         self.assertRaises(etree.XMLSyntaxError, etree.fromstring, '')
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_element_cyclic_gc_none(self):
-         # test if cyclic reference can crash etree
-         Element = self.etree.Element
-diff --git a/src/lxml/tests/test_http_io.py b/src/lxml/tests/test_http_io.py
-index f9eff39a..edf2bd81 100644
---- a/src/lxml/tests/test_http_io.py
-+++ b/src/lxml/tests/test_http_io.py
-@@ -11,10 +11,11 @@ import textwrap
- import sys
- 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
- 
- 
-+@unittest.skipIf(IS_PYPY, "broken on pypy")
- class HttpIOTestCase(HelperTestCase):
-     etree = etree
- 
-diff --git a/src/lxml/tests/test_nsclasses.py b/src/lxml/tests/test_nsclasses.py
-index a0aa608d..5aa5dc48 100644
---- a/src/lxml/tests/test_nsclasses.py
-+++ b/src/lxml/tests/test_nsclasses.py
-@@ -9,7 +9,7 @@ from __future__ import absolute_import
- 
- import unittest
- 
--from .common_imports import etree, HelperTestCase, _bytes, make_doctest
-+from .common_imports import etree, HelperTestCase, _bytes, make_doctest, IS_PYPY
- 
- class ETreeNamespaceClassesTestCase(HelperTestCase):
-     
-@@ -46,6 +46,7 @@ class ETreeNamespaceClassesTestCase(HelperTestCase):
-         self.Namespace('ns02').clear()
-         self.Namespace('ns03').clear()
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_ns_classes(self):
-         bluff_dict = {'bluff' : self.bluff_class}
-         maeh_dict  = {'maeh'  : self.maeh_class}
-diff --git a/src/lxml/tests/test_objectify.py b/src/lxml/tests/test_objectify.py
-index a12ae7e1..83ba4ced 100644
---- a/src/lxml/tests/test_objectify.py
-+++ b/src/lxml/tests/test_objectify.py
-@@ -9,7 +9,8 @@ from __future__ import absolute_import
- import unittest, operator
- 
- from .common_imports import (
--    etree, HelperTestCase, fileInTestDir, doctest, make_doctest, _bytes, _str, BytesIO
-+    etree, HelperTestCase, fileInTestDir, doctest, make_doctest, _bytes, _str, BytesIO,
-+    IS_PYPY
- )
- 
- from lxml import objectify
-@@ -213,11 +214,13 @@ class ObjectifyTestCase(HelperTestCase):
-         expected.update(DEFAULT_NSMAP)
-         self.assertEqual(root.value.nsmap, expected)
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_date_element_efactory_text(self):
-         # ObjectifiedDataElement can also be used as E-Factory
-         value = objectify.ObjectifiedDataElement('test', 'toast')
-         self.assertEqual(value.text, 'testtoast')
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_date_element_efactory_tail(self):
-         # ObjectifiedDataElement can also be used as E-Factory
-         value = objectify.ObjectifiedElement(objectify.ObjectifiedDataElement(), 'test', 'toast')
-@@ -374,6 +377,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertEqual("4", getattr(root.c1, "{}c2").text)
-         self.assertEqual("0", getattr(root.c1, "c2").text)
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_setattr(self):
-         for val in [
-             2, 2**32, 1.2, "Won't get fooled again", 
-@@ -809,6 +813,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertEqual(3, len(root.findall(".//b")))
-         self.assertEqual(2, len(root.findall("b")))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_build_tree(self):
-         root = self.Element('root')
-         root.a = 5
-@@ -838,6 +843,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertEqual(value, None)
-         self.assertEqual(value.get(XML_SCHEMA_NIL_ATTR), "true")
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_bool(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -871,6 +877,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertTrue(isinstance(value, objectify.BoolElement))
-         self.assertEqual(value, False)
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_str(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -878,6 +885,7 @@ class ObjectifyTestCase(HelperTestCase):
-         root.s = "test"
-         self.assertTrue(isinstance(root.s, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_str_intliteral(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -885,6 +893,7 @@ class ObjectifyTestCase(HelperTestCase):
-         root.s = "3"
-         self.assertTrue(isinstance(root.s, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_str_floatliteral(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -892,6 +901,7 @@ class ObjectifyTestCase(HelperTestCase):
-         root.s = "3.72"
-         self.assertTrue(isinstance(root.s, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_str_mul(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -904,6 +914,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertRaises(TypeError, operator.mul, root.s, "honk")
-         self.assertRaises(TypeError, operator.mul, "honk", root.s)
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_str_add(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -914,6 +925,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertEqual("test" + s, root.s + s)
-         self.assertEqual(s + "test", s + root.s)
-             
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_str_mod(self):
-         s = "%d %f %s %r"
-         el = objectify.DataElement(s)
-@@ -979,6 +991,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertTrue(isinstance(value, objectify.StringElement))
-         self.assertEqual(value, "3.20")
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_ustr(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -986,6 +999,7 @@ class ObjectifyTestCase(HelperTestCase):
-         root.s = _str("test")
-         self.assertTrue(isinstance(root.s, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_ustr_intliteral(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -993,6 +1007,7 @@ class ObjectifyTestCase(HelperTestCase):
-         root.s = _str("3")
-         self.assertTrue(isinstance(root.s, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_ustr_floatliteral(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -1000,6 +1015,7 @@ class ObjectifyTestCase(HelperTestCase):
-         root.s = _str("3.72")
-         self.assertTrue(isinstance(root.s, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_ustr_mul(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -1012,6 +1028,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertRaises(TypeError, operator.mul, root.s, _str("honk"))
-         self.assertRaises(TypeError, operator.mul, _str("honk"), root.s)
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_ustr_add(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -1037,6 +1054,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertTrue(isinstance(value, objectify.StringElement))
-         self.assertEqual(value, _str("3.20"))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_int(self):
-         Element = self.Element
-         root = Element("{objectified}root")
-@@ -1053,6 +1071,7 @@ class ObjectifyTestCase(HelperTestCase):
-         value = objectify.DataElement(123)
-         self.assertEqual(hash(value), hash(123))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_float(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -1069,6 +1088,7 @@ class ObjectifyTestCase(HelperTestCase):
-         value = objectify.DataElement(5.5)
-         self.assertEqual(hash(value), hash(5.5))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_float_precision(self):
-         # test not losing precision by shortened float str() value
-         # repr(2.305064300557): '2.305064300557'
-@@ -1088,6 +1108,7 @@ class ObjectifyTestCase(HelperTestCase):
-         s = "2.305064300557"
-         self.assertEqual(objectify.FloatElement(s), float(s))
-   
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_float_precision_consistency(self):
-         # test consistent FloatElement values for the different instantiation
-         # possibilities
-@@ -1169,6 +1190,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertEqual(value.text, None)
-         self.assertEqual(value.pyval, None)
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_unregistered(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -1331,6 +1353,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertEqual(["why", "try"],
-                           strs)
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_str_cmp(self):
-         XML = self.XML
-         root = XML(_bytes('<root><b>test</b><b>taste</b><b></b><b/></root>'))
-@@ -1358,6 +1381,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertEqual(root.b, "")
-         self.assertEqual("", root.b)
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_int_cmp(self):
-         XML = self.XML
-         root = XML(_bytes('<root><b>5</b><b>6</b></root>'))
-@@ -1380,6 +1404,7 @@ class ObjectifyTestCase(HelperTestCase):
-         
-     # float + long share the NumberElement implementation with int
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_bool_cmp(self):
-         XML = self.XML
-         root = XML(_bytes('<root><b>false</b><b>true</b></root>'))
-@@ -2049,6 +2074,7 @@ class ObjectifyTestCase(HelperTestCase):
-                           before = [objectify.getRegisteredTypes()[0].name],
-                           after  = [objectify.getRegisteredTypes()[1].name])
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_registered_type_stringify(self):
-         from datetime import datetime
-         def parse_date(value):
-@@ -2519,46 +2545,55 @@ class ObjectifyTestCase(HelperTestCase):
- 
-     # E-Factory tests, need to use sub-elements as root element is always
-     # type-looked-up as ObjectifiedElement (no annotations)
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_int(self):
-         E = objectify.E
-         root = E.root(E.val(23))
-         self.assertTrue(isinstance(root.val, objectify.IntElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_float(self):
-         E = objectify.E
-         root = E.root(E.val(233.23))
-         self.assertTrue(isinstance(root.val, objectify.FloatElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_str(self):
-         E = objectify.E
-         root = E.root(E.val("what?"))
-         self.assertTrue(isinstance(root.val, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_unicode(self):
-         E = objectify.E
-         root = E.root(E.val(_str("blöödy häll", encoding="ISO-8859-1")))
-         self.assertTrue(isinstance(root.val, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_bool(self):
-         E = objectify.E
-         root = E.root(E.val(True))
-         self.assertTrue(isinstance(root.val, objectify.BoolElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_none(self):
-         E = objectify.E
-         root = E.root(E.val(None))
-         self.assertTrue(isinstance(root.val, objectify.NoneElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_value_concatenation(self):
-         E = objectify.E
-         root = E.root(E.val(1, "foo", 2.0, "bar ", True, None))
-         self.assertTrue(isinstance(root.val, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_attrib(self):
-         E = objectify.E
-         root = E.root(foo="bar")
-         self.assertEqual(root.get("foo"), "bar")
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_nested(self):
-         E = objectify.E
-         DataElement = objectify.DataElement
-@@ -2573,6 +2608,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertTrue(isinstance(root.value[0], objectify.IntElement))
-         self.assertTrue(isinstance(root.value[1], objectify.FloatElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_subtype(self):
-         class Attribute(objectify.ObjectifiedDataElement):
-             def __init__(self):
-@@ -2674,7 +2710,8 @@ def test_suite():
-     suite = unittest.TestSuite()
-     suite.addTests([unittest.makeSuite(ObjectifyTestCase)])
-     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
- 
- if __name__ == '__main__':
-diff --git a/src/lxml/tests/test_xpathevaluator.py b/src/lxml/tests/test_xpathevaluator.py
-index 13ee97ec..6d162c6d 100644
---- a/src/lxml/tests/test_xpathevaluator.py
-+++ b/src/lxml/tests/test_xpathevaluator.py
-@@ -8,7 +8,7 @@ from __future__ import absolute_import
- 
- import unittest, sys
- 
--from .common_imports import etree, HelperTestCase, _bytes, BytesIO, doctest, make_doctest
-+from .common_imports import etree, HelperTestCase, _bytes, BytesIO, doctest, make_doctest, IS_PYPY
- 
- 
- class ETreeXPathTestCase(HelperTestCase):
-@@ -740,8 +740,9 @@ def test_suite():
-         suite.addTests([unittest.makeSuite(ETreeXPathExsltTestCase)])
-     suite.addTests([unittest.makeSuite(ETreeETXPathClassTestCase)])
-     suite.addTests([doctest.DocTestSuite()])
--    suite.addTests(
--        [make_doctest('../../../doc/xpathxslt.txt')])
-+    if not IS_PYPY:
-+        suite.addTests(
-+            [make_doctest('../../../doc/xpathxslt.txt')])
-     return suite
- 
- if __name__ == '__main__':
-diff --git a/src/lxml/tests/test_xslt.py b/src/lxml/tests/test_xslt.py
-index cde23357..41f8d78b 100644
---- a/src/lxml/tests/test_xslt.py
-+++ b/src/lxml/tests/test_xslt.py
-@@ -17,6 +17,8 @@ from textwrap import dedent
- from tempfile import NamedTemporaryFile, mkdtemp
- 
- is_python3 = sys.version_info[0] >= 3
-+is_pypy = (getattr(sys, 'implementation', None) == 'pypy' or
-+           getattr(sys, 'pypy_version_info', None) is not None)
- 
- try:
-     unicode
-@@ -2085,8 +2087,9 @@ def test_suite():
-         suite.addTests([unittest.makeSuite(Py3XSLTTestCase)])
-     suite.addTests(
-         [make_doctest('../../../doc/extensions.txt')])
--    suite.addTests(
--        [make_doctest('../../../doc/xpathxslt.txt')])
-+    if not is_pypy:
-+        suite.addTests(
-+            [make_doctest('../../../doc/xpathxslt.txt')])
-     return suite
- 
- if __name__ == '__main__':
--- 
-2.25.0
-

diff --git a/dev-python/lxml/lxml-4.5.2-r1.ebuild b/dev-python/lxml/lxml-4.5.2-r1.ebuild
deleted file mode 100644
index 91bdb6ed77b..00000000000
--- a/dev-python/lxml/lxml-4.5.2-r1.ebuild
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7,8,9} 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"
-S=${WORKDIR}/lxml-${P}
-
-LICENSE="BSD ElementTree GPL-2 PSF-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc examples +threads test"
-RESTRICT="!test? ( test )"
-
-# Note: lib{xml2,xslt} are used as C libraries, not Python modules.
-RDEPEND="
-	>=dev-libs/libxml2-2.9.5
-	>=dev-libs/libxslt-1.1.28"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	virtual/pkgconfig
-	dev-python/cython[${PYTHON_USEDEP}]
-	dev-python/setuptools[${PYTHON_USEDEP}]
-	test? ( dev-python/cssselect[${PYTHON_USEDEP}] )
-	"
-
-DISTUTILS_IN_SOURCE_BUILD=1
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-4.5.0-tests-pypy.patch
-)
-
-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() {
-	if ! python_is_python3; then
-		local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
-	fi
-	tc-export PKG_CONFIG
-	distutils-r1_python_compile
-}
-
-python_test() {
-	cp -r -l src/lxml/tests "${BUILD_DIR}"/lib/lxml/ || die
-	cp -r -l src/lxml/html/tests "${BUILD_DIR}"/lib/lxml/html/ || die
-	ln -s "${S}"/doc "${BUILD_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/beautifulsoup
-	optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/files/, dev-python/lxml/
@ 2021-12-11 23:24 Michał Górny
  0 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2021-12-11 23:24 UTC (permalink / raw
  To: gentoo-commits

commit:     ce342520c066f999b7e4a43fda9a170cec32c6ec
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 11 19:58:59 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Dec 11 23:24:40 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce342520

dev-python/lxml: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/lxml/Manifest                           |   1 -
 .../lxml/files/lxml-4.6.3-tests-libxml2.patch      |  22 -----
 dev-python/lxml/lxml-4.6.3-r1.ebuild               | 101 ---------------------
 3 files changed, 124 deletions(-)

diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
index 2beb210c3e8b..f2f9855e1d2d 100644
--- a/dev-python/lxml/Manifest
+++ b/dev-python/lxml/Manifest
@@ -1,2 +1 @@
-DIST lxml-4.6.3.tar.gz 948931 BLAKE2B 373248827cb6bc0698b632ef60978adb2b8f7c37444fa1804567f08eb669018dc38fadf52422262fd96280e88c59578d244e4c5a1ed55609af55c010b3bf2b09 SHA512 50e42d6269dc45b4c0ab3285c49307f8bee87fcc4b9e0f531e1ee37bcf83c5938b7e361f906a3158fac8df89a79b932dd64a8839455e45f45f3a5f0ba73ff6a5
 DIST lxml-4.6.4.tar.gz 953275 BLAKE2B 7dae0fe0c92c937d823429b32ae952e501e193835892d40746aa35e48586df4e497865f246362ef10430cc9187cd54f98078b7edcc0fd9f421ac9d15994e7b2a SHA512 4e62b7c9ceec47f490136e86e9875aae3f3dccd0ee5e504f8128c62cdb111e00e64ee35678028438b87d32253fdeb8e1184d4017b56e06dfbc93cd0e8736101f

diff --git a/dev-python/lxml/files/lxml-4.6.3-tests-libxml2.patch b/dev-python/lxml/files/lxml-4.6.3-tests-libxml2.patch
deleted file mode 100644
index 4c682add3a2d..000000000000
--- a/dev-python/lxml/files/lxml-4.6.3-tests-libxml2.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-https://github.com/lxml/lxml/commit/852ed1092bd80b6b9a51db24371047ec88843031
-https://bugs.gentoo.org/791190
-
-From: Stefan Behnel <stefan_ml@behnel.de>
-Date: Tue, 18 May 2021 22:02:02 +0200
-Subject: [PATCH] Adapt a test to a behavioural change in libxml2 2.9.11+.
-
---- a/src/lxml/tests/test_etree.py
-+++ b/src/lxml/tests/test_etree.py
-@@ -3036,7 +3036,10 @@ def test_subelement_nsmap(self):
-     def test_html_prefix_nsmap(self):
-         etree = self.etree
-         el = etree.HTML('<hha:page-description>aa</hha:page-description>').find('.//page-description')
--        self.assertEqual({'hha': None}, el.nsmap)
-+        if etree.LIBXML_VERSION < (2, 9, 11):
-+            self.assertEqual({'hha': None}, el.nsmap)
-+        else:
-+            self.assertEqual({}, el.nsmap)
- 
-     def test_getchildren(self):
-         Element = self.etree.Element
-

diff --git a/dev-python/lxml/lxml-4.6.3-r1.ebuild b/dev-python/lxml/lxml-4.6.3-r1.ebuild
deleted file mode 100644
index cf132e427473..000000000000
--- a/dev-python/lxml/lxml-4.6.3-r1.ebuild
+++ /dev/null
@@ -1,101 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..10} 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"
-S=${WORKDIR}/lxml-${P}
-
-LICENSE="BSD ElementTree GPL-2 PSF-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc examples +threads test"
-RESTRICT="!test? ( test )"
-
-# Note: lib{xml2,xslt} are used as C libraries, not Python modules.
-RDEPEND="
-	>=dev-libs/libxml2-2.9.12-r2
-	>=dev-libs/libxslt-1.1.28"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	virtual/pkgconfig
-	dev-python/cython[${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}] )
-	"
-
-DISTUTILS_IN_SOURCE_BUILD=1
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-4.6.0-tests-pypy.patch
-	"${FILESDIR}"/${P}-tests-libxml2.patch
-)
-
-python_check_deps() {
-	use doc || return 0
-	has_version "dev-python/docutils[${PYTHON_USEDEP}]" &&
-	has_version "dev-python/pygments[${PYTHON_USEDEP}]" &&
-	has_version "dev-python/sphinx[${PYTHON_USEDEP}]" &&
-	has_version "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() {
-	if ! python_is_python3; then
-		local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
-	fi
-	tc-export PKG_CONFIG
-	distutils-r1_python_compile
-}
-
-python_compile_all() {
-	use doc && emake html
-}
-
-python_test() {
-	cp -r -l src/lxml/tests "${BUILD_DIR}"/lib/lxml/ || die
-	cp -r -l src/lxml/html/tests "${BUILD_DIR}"/lib/lxml/html/ || die
-	ln -s "${S}"/doc "${BUILD_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
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/files/, dev-python/lxml/
@ 2023-05-25  3:18 Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2023-05-25  3:18 UTC (permalink / raw
  To: gentoo-commits

commit:     6e26f683b520a7dc58601ec1cffc4f2655ed34dc
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu May 25 03:07:48 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu May 25 03:14:22 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e26f683

dev-python/lxml: enable py3.12

Same failures as with other Pythons (new libxslt/libxml2).

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../lxml-4.9.2-py3.12-drop-deprecated-imp.patch    | 49 ++++++++++++++++++++++
 dev-python/lxml/lxml-4.9.2.ebuild                  |  3 +-
 2 files changed, 51 insertions(+), 1 deletion(-)

diff --git a/dev-python/lxml/files/lxml-4.9.2-py3.12-drop-deprecated-imp.patch b/dev-python/lxml/files/lxml-4.9.2-py3.12-drop-deprecated-imp.patch
new file mode 100644
index 000000000000..a59a60e74822
--- /dev/null
+++ b/dev-python/lxml/files/lxml-4.9.2-py3.12-drop-deprecated-imp.patch
@@ -0,0 +1,49 @@
+https://github.com/lxml/lxml/commit/07db761f9f027d1814a43686cda6fca26e37a931
+https://github.com/lxml/lxml/commit/c6b7e621e4696c02bf8f6ea423ffbbf2109748ab
+
+From 07db761f9f027d1814a43686cda6fca26e37a931 Mon Sep 17 00:00:00 2001
+From: Stefan Behnel <stefan_ml@behnel.de>
+Date: Thu, 11 May 2023 10:29:02 +0200
+Subject: [PATCH] Avoid using the deprecated "imp" module.
+
+Closes https://bugs.launchpad.net/lxml/+bug/2018137
+--- a/src/lxml/html/tests/test_html5parser.py
++++ b/src/lxml/html/tests/test_html5parser.py
+@@ -1,5 +1,4 @@
+ import os
+-import imp
+ try:
+     from StringIO import StringIO
+ except ImportError:                     # python 3
+@@ -45,7 +44,10 @@ def find_module(self, fullname, path=None):
+             return None
+ 
+         def load_module(self, fullname):
+-            mod = sys.modules.setdefault(fullname, imp.new_module(fullname))
++            fake_module = object()
++            fake_module.__qualname__ = fullname
++            fake_module.__name__ = fullname.rsplit('.', 1)[-1]
++            mod = sys.modules.setdefault(fullname, fake_module)
+             mod.__file__, mod.__loader__, mod.__path__ = "<dummy>", self, []
+             mod.__dict__.update(self.mocks[fullname])
+             return mod
+
+From c6b7e621e4696c02bf8f6ea423ffbbf2109748ab Mon Sep 17 00:00:00 2001
+From: Stefan Behnel <stefan_ml@behnel.de>
+Date: Thu, 11 May 2023 10:30:15 +0200
+Subject: [PATCH] Avoid using the deprecated "imp" module.
+
+Closes https://bugs.launchpad.net/lxml/+bug/2018137
+--- a/src/lxml/html/tests/test_html5parser.py
++++ b/src/lxml/html/tests/test_html5parser.py
+@@ -44,7 +44,8 @@ def find_module(self, fullname, path=None):
+             return None
+ 
+         def load_module(self, fullname):
+-            fake_module = object()
++            class Cls: pass
++            fake_module = Cls()
+             fake_module.__qualname__ = fullname
+             fake_module.__name__ = fullname.rsplit('.', 1)[-1]
+             mod = sys.modules.setdefault(fullname, fake_module)
+

diff --git a/dev-python/lxml/lxml-4.9.2.ebuild b/dev-python/lxml/lxml-4.9.2.ebuild
index b7b3efc9de22..aed3280a3b2c 100644
--- a/dev-python/lxml/lxml-4.9.2.ebuild
+++ b/dev-python/lxml/lxml-4.9.2.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 DISTUTILS_EXT=1
 DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{9..11} pypy3 )
+PYTHON_COMPAT=( python3_{10..12} pypy3 )
 
 inherit distutils-r1 optfeature toolchain-funcs
 
@@ -54,6 +54,7 @@ BDEPEND="
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-4.6.0-tests-pypy.patch
+	"${FILESDIR}"/${P}-py3.12-drop-deprecated-imp.patch
 )
 
 python_check_deps() {


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/files/, dev-python/lxml/
@ 2023-06-06  5:34 Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2023-06-06  5:34 UTC (permalink / raw
  To: gentoo-commits

commit:     fff86605fbd568f23e4af7cc6bf3536294fdbafc
Author:     Violet Purcell <vimproved <AT> inventati <DOT> org>
AuthorDate: Tue Jun  6 03:25:00 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jun  6 05:34:31 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fff86605

dev-python/lxml: Backport py3.12 unicode fix

Signed-off-by: Violet Purcell <vimproved <AT> inventati.org>
Closes: https://github.com/gentoo/gentoo/pull/31327
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../lxml-4.9.2-py3.12-backport-unicode-fix.patch   |  33 ++++++
 dev-python/lxml/lxml-4.9.2-r1.ebuild               | 116 +++++++++++++++++++++
 2 files changed, 149 insertions(+)

diff --git a/dev-python/lxml/files/lxml-4.9.2-py3.12-backport-unicode-fix.patch b/dev-python/lxml/files/lxml-4.9.2-py3.12-backport-unicode-fix.patch
new file mode 100644
index 000000000000..d1ca31d1b909
--- /dev/null
+++ b/dev-python/lxml/files/lxml-4.9.2-py3.12-backport-unicode-fix.patch
@@ -0,0 +1,33 @@
+Upstream: https://github.com/lxml/lxml/commit/a1f2231dfdd31a37f2c55bc9ae4ac33e92221227
+
+From a1f2231dfdd31a37f2c55bc9ae4ac33e92221227 Mon Sep 17 00:00:00 2001
+From: Stefan Behnel <stefan_ml@behnel.de>
+Date: Fri, 12 May 2023 09:49:34 +0200
+Subject: [PATCH] Adapt unicode parsing to Py3.12.
+
+---
+ src/lxml/includes/etree_defs.h | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/lxml/includes/etree_defs.h b/src/lxml/includes/etree_defs.h
+index e671fa85d..d42f2158c 100644
+--- a/src/lxml/includes/etree_defs.h
++++ b/src/lxml/includes/etree_defs.h
+@@ -120,6 +120,16 @@ static PyObject* PyBytes_FromFormat(const char* format, ...) {
+ #  define _lx_PySlice_GetIndicesEx(o, l, b, e, s, sl) PySlice_GetIndicesEx(((PySliceObject*)o), l, b, e, s, sl)
+ #endif
+ 
++#if PY_VERSION_HEX >= 0x030B00A1
++/* Python 3.12 doesn't have wstr Unicode strings any more. */
++#undef PyUnicode_GET_DATA_SIZE
++#define PyUnicode_GET_DATA_SIZE(ustr)  (0)
++#undef PyUnicode_AS_DATA
++#define PyUnicode_AS_DATA(ustr)  (NULL)
++#undef PyUnicode_IS_READY
++#define PyUnicode_IS_READY(ustr)  (1)
++#endif
++
+ #ifdef WITHOUT_THREADING
+ #  undef PyEval_SaveThread
+ #  define PyEval_SaveThread() (NULL)
+

diff --git a/dev-python/lxml/lxml-4.9.2-r1.ebuild b/dev-python/lxml/lxml-4.9.2-r1.ebuild
new file mode 100644
index 000000000000..9b26e534fcf8
--- /dev/null
+++ b/dev-python/lxml/lxml-4.9.2-r1.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2023 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 ~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.9.12-r2
+	>=dev-libs/libxslt-1.1.28
+"
+RDEPEND="
+	${DEPEND}
+"
+BDEPEND="
+	virtual/pkgconfig
+	<dev-python/cython-3[${PYTHON_USEDEP}]
+	>=dev-python/cython-0.29.29[${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}-4.6.0-tests-pypy.patch
+	"${FILESDIR}"/${P}-py3.12-drop-deprecated-imp.patch
+	"${FILESDIR}"/${P}-py3.12-backport-unicode-fix.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() {
+	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
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/files/, dev-python/lxml/
@ 2023-10-25  5:54 Michał Górny
  0 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2023-10-25  5:54 UTC (permalink / raw
  To: gentoo-commits

commit:     1ccc4c73c59d0f0518771a3dd79a4163db75fac3
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 25 05:11:59 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Oct 25 05:54:12 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ccc4c73

dev-python/lxml: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/lxml/Manifest                           |   1 -
 dev-python/lxml/files/lxml-4.6.0-tests-pypy.patch  | 452 ---------------------
 .../lxml-4.9.2-py3.12-backport-unicode-fix.patch   |  33 --
 .../lxml-4.9.2-py3.12-drop-deprecated-imp.patch    |  49 ---
 dev-python/lxml/lxml-4.9.2-r1.ebuild               | 116 ------
 dev-python/lxml/lxml-4.9.2.ebuild                  | 115 ------
 dev-python/lxml/lxml-4.9.3.ebuild                  | 114 ------
 7 files changed, 880 deletions(-)

diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
index a58f79e32b3b..a90d7b0650ac 100644
--- a/dev-python/lxml/Manifest
+++ b/dev-python/lxml/Manifest
@@ -1,4 +1,3 @@
-DIST lxml-4.9.2.gh.tar.gz 957365 BLAKE2B 201b3977da90386e413f1b89a4b7ee1e44d6bbea05e622e92feb1d67c637ce46ebf746f0648f034ed3bccd609233ccf7d8a7ee456f13b8d9ca8587ddf1ebd32a SHA512 816b2fe2eef2a97a0df66cbc39850c6dc3d6470e4033cc73edb40c80c0afbbe6c084d042d7c98b29497926e76f648caa42e1ebe5d83060af08af6972316077b0
 DIST lxml-4.9.3-patches-2.tar.xz 24288 BLAKE2B 47b7c486a1c1616c875111bd53b14d4211a1eee3f412985f4022e71b85b087abd71d36919fb025257f17de404329284898ddc639f85e8b15ade21778fa218d98 SHA512 713172b4c907db6479a0a803a842824825b212a9b645c1ca356f793658bd6c63113ea248278e7c46b512e22e3130696e9fc5127fea82a67372d920733fc160b0
 DIST lxml-4.9.3-patches.tar.xz 10544 BLAKE2B 407938d2f701400e919110c3bfe84e94621f39f8178850c466d41549ee0eff4f23e93cdd8ea684713e8276acfaa05d6f7b7af4d375c859b9fc5b2981d60983a3 SHA512 c2d5d2ffb035aed6d846de84885b87142b2be7a09ffe6927e7c032acab343730acfcbefd75e8141cf3b41b308c532869a7878b515f3d4eeefa7526a3d2599398
 DIST lxml-4.9.3.gh.tar.gz 958628 BLAKE2B ffdf3fe781a03815f7c026229d313721c93375ebafad9b4a20c5d8a380a631401e546d8701a94d8c49615fb6a71e84940d8ca0299b47a37c1c9596db36659113 SHA512 903bd4935c7708b459aee9befcf3f6e3e3aaa9adc122591ea923b6e3d8fd288f07cab3f5f0edb08e3bf9db80414324f0a1a8e5a5089f9cda82f6c50f5df59423

diff --git a/dev-python/lxml/files/lxml-4.6.0-tests-pypy.patch b/dev-python/lxml/files/lxml-4.6.0-tests-pypy.patch
deleted file mode 100644
index 51bcb8fe2e22..000000000000
--- a/dev-python/lxml/files/lxml-4.6.0-tests-pypy.patch
+++ /dev/null
@@ -1,452 +0,0 @@
-From 1804702b5e3c85c1a16014d62365a29d0a6d0c75 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Thu, 30 Jan 2020 06:15:27 +0100
-Subject: [PATCH] Skip tests failing on PyPy
-
----
- src/lxml/tests/test_elementtree.py    |  3 +-
- src/lxml/tests/test_errors.py         |  3 +-
- src/lxml/tests/test_http_io.py        |  3 +-
- src/lxml/tests/test_nsclasses.py      |  3 +-
- src/lxml/tests/test_objectify.py      | 41 +++++++++++++++++++++++++--
- src/lxml/tests/test_xpathevaluator.py |  7 +++--
- src/lxml/tests/test_xslt.py           |  7 +++--
- 7 files changed, 56 insertions(+), 11 deletions(-)
-
-diff --git a/src/lxml/tests/test_elementtree.py b/src/lxml/tests/test_elementtree.py
-index 78d8964d..f3f28044 100644
---- a/src/lxml/tests/test_elementtree.py
-+++ b/src/lxml/tests/test_elementtree.py
-@@ -26,7 +26,7 @@ from .common_imports import (
-     BytesIO, etree, HelperTestCase,
-     ElementTree, cElementTree, ET_VERSION, CET_VERSION,
-     filter_by_version, fileInTestDir, canonicalize, tmpfile,
--    _str, _bytes, unicode, IS_PYTHON2
-+    _str, _bytes, unicode, IS_PYTHON2, IS_PYPY
- )
- 
- if cElementTree is not None and (CET_VERSION <= (1,0,7) or sys.version_info[0] >= 3):
-@@ -2956,6 +2956,7 @@ class _ETreeTestCaseBase(HelperTestCase):
-         self.assertEqual('TEST', root2[0].get('{%s}a' % ns_href))
- 
-     required_versions_ET['test_register_namespace'] = (1,3)
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_register_namespace(self):
-         # ET 1.3+
-         Element = self.etree.Element
-diff --git a/src/lxml/tests/test_errors.py b/src/lxml/tests/test_errors.py
-index c0aee744..33111429 100644
---- a/src/lxml/tests/test_errors.py
-+++ b/src/lxml/tests/test_errors.py
-@@ -11,7 +11,7 @@ import unittest
- import sys, gc, os.path
- from lxml import etree
- 
--from .common_imports import HelperTestCase
-+from .common_imports import HelperTestCase, IS_PYPY
- 
- 
- class ErrorTestCase(HelperTestCase):
-@@ -25,6 +25,7 @@ class ErrorTestCase(HelperTestCase):
-     def test_empty_parse(self):
-         self.assertRaises(etree.XMLSyntaxError, etree.fromstring, '')
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_element_cyclic_gc_none(self):
-         # test if cyclic reference can crash etree
-         Element = self.etree.Element
-diff --git a/src/lxml/tests/test_http_io.py b/src/lxml/tests/test_http_io.py
-index f9eff39a..edf2bd81 100644
---- a/src/lxml/tests/test_http_io.py
-+++ b/src/lxml/tests/test_http_io.py
-@@ -11,10 +11,11 @@ import textwrap
- import sys
- 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
- 
- 
-+@unittest.skipIf(IS_PYPY, "broken on pypy")
- class HttpIOTestCase(HelperTestCase):
-     etree = etree
- 
-diff --git a/src/lxml/tests/test_nsclasses.py b/src/lxml/tests/test_nsclasses.py
-index a0aa608d..5aa5dc48 100644
---- a/src/lxml/tests/test_nsclasses.py
-+++ b/src/lxml/tests/test_nsclasses.py
-@@ -9,7 +9,7 @@ from __future__ import absolute_import
- 
- import unittest
- 
--from .common_imports import etree, HelperTestCase, _bytes, make_doctest
-+from .common_imports import etree, HelperTestCase, _bytes, make_doctest, IS_PYPY
- 
- class ETreeNamespaceClassesTestCase(HelperTestCase):
-     
-@@ -46,6 +46,7 @@ class ETreeNamespaceClassesTestCase(HelperTestCase):
-         self.Namespace('ns02').clear()
-         self.Namespace('ns03').clear()
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_ns_classes(self):
-         bluff_dict = {'bluff' : self.bluff_class}
-         maeh_dict  = {'maeh'  : self.maeh_class}
-diff --git a/src/lxml/tests/test_objectify.py b/src/lxml/tests/test_objectify.py
-index a12ae7e1..83ba4ced 100644
---- a/src/lxml/tests/test_objectify.py
-+++ b/src/lxml/tests/test_objectify.py
-@@ -9,7 +9,8 @@ from __future__ import absolute_import
- import unittest, operator
- 
- from .common_imports import (
--    etree, HelperTestCase, fileInTestDir, doctest, make_doctest, _bytes, _str, BytesIO
-+    etree, HelperTestCase, fileInTestDir, doctest, make_doctest, _bytes, _str, BytesIO,
-+    IS_PYPY
- )
- 
- from lxml import objectify
-@@ -213,11 +214,13 @@ class ObjectifyTestCase(HelperTestCase):
-         expected.update(DEFAULT_NSMAP)
-         self.assertEqual(root.value.nsmap, expected)
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_date_element_efactory_text(self):
-         # ObjectifiedDataElement can also be used as E-Factory
-         value = objectify.ObjectifiedDataElement('test', 'toast')
-         self.assertEqual(value.text, 'testtoast')
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_date_element_efactory_tail(self):
-         # ObjectifiedDataElement can also be used as E-Factory
-         value = objectify.ObjectifiedElement(objectify.ObjectifiedDataElement(), 'test', 'toast')
-@@ -374,6 +377,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertEqual("4", getattr(root.c1, "{}c2").text)
-         self.assertEqual("0", getattr(root.c1, "c2").text)
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_setattr(self):
-         for val in [
-             2, 2**32, 1.2, "Won't get fooled again", 
-@@ -809,6 +813,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertEqual(3, len(root.findall(".//b")))
-         self.assertEqual(2, len(root.findall("b")))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_build_tree(self):
-         root = self.Element('root')
-         root.a = 5
-@@ -838,6 +843,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertEqual(value, None)
-         self.assertEqual(value.get(XML_SCHEMA_NIL_ATTR), "true")
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_bool(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -871,6 +877,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertTrue(isinstance(value, objectify.BoolElement))
-         self.assertEqual(value, False)
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_str(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -878,6 +885,7 @@ class ObjectifyTestCase(HelperTestCase):
-         root.s = "test"
-         self.assertTrue(isinstance(root.s, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_str_intliteral(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -885,6 +893,7 @@ class ObjectifyTestCase(HelperTestCase):
-         root.s = "3"
-         self.assertTrue(isinstance(root.s, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_str_floatliteral(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -892,6 +901,7 @@ class ObjectifyTestCase(HelperTestCase):
-         root.s = "3.72"
-         self.assertTrue(isinstance(root.s, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_str_mul(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -904,6 +914,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertRaises(TypeError, operator.mul, root.s, "honk")
-         self.assertRaises(TypeError, operator.mul, "honk", root.s)
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_str_add(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -914,6 +925,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertEqual("test" + s, root.s + s)
-         self.assertEqual(s + "test", s + root.s)
-             
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_str_mod(self):
-         s = "%d %f %s %r"
-         el = objectify.DataElement(s)
-@@ -979,6 +991,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertTrue(isinstance(value, objectify.StringElement))
-         self.assertEqual(value, "3.20")
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_ustr(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -986,6 +999,7 @@ class ObjectifyTestCase(HelperTestCase):
-         root.s = _str("test")
-         self.assertTrue(isinstance(root.s, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_ustr_intliteral(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -993,6 +1007,7 @@ class ObjectifyTestCase(HelperTestCase):
-         root.s = _str("3")
-         self.assertTrue(isinstance(root.s, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_ustr_floatliteral(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -1000,6 +1015,7 @@ class ObjectifyTestCase(HelperTestCase):
-         root.s = _str("3.72")
-         self.assertTrue(isinstance(root.s, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_ustr_mul(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -1012,6 +1028,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertRaises(TypeError, operator.mul, root.s, _str("honk"))
-         self.assertRaises(TypeError, operator.mul, _str("honk"), root.s)
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_ustr_add(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -1037,6 +1054,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertTrue(isinstance(value, objectify.StringElement))
-         self.assertEqual(value, _str("3.20"))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_int(self):
-         Element = self.Element
-         root = Element("{objectified}root")
-@@ -1053,6 +1071,7 @@ class ObjectifyTestCase(HelperTestCase):
-         value = objectify.DataElement(123)
-         self.assertEqual(hash(value), hash(123))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_float(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -1069,6 +1088,7 @@ class ObjectifyTestCase(HelperTestCase):
-         value = objectify.DataElement(5.5)
-         self.assertEqual(hash(value), hash(5.5))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_float_precision(self):
-         # test not losing precision by shortened float str() value
-         # repr(2.305064300557): '2.305064300557'
-@@ -1088,6 +1108,7 @@ class ObjectifyTestCase(HelperTestCase):
-         s = "2.305064300557"
-         self.assertEqual(objectify.FloatElement(s), float(s))
-   
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_float_precision_consistency(self):
-         # test consistent FloatElement values for the different instantiation
-         # possibilities
-@@ -1169,6 +1190,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertEqual(value.text, None)
-         self.assertEqual(value.pyval, None)
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_unregistered(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -1331,6 +1353,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertEqual(["why", "try"],
-                           strs)
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_str_cmp(self):
-         XML = self.XML
-         root = XML(_bytes('<root><b>test</b><b>taste</b><b></b><b/></root>'))
-@@ -1358,6 +1381,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertEqual(root.b, "")
-         self.assertEqual("", root.b)
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_int_cmp(self):
-         XML = self.XML
-         root = XML(_bytes('<root><b>5</b><b>6</b></root>'))
-@@ -1380,6 +1404,7 @@ class ObjectifyTestCase(HelperTestCase):
-         
-     # float + long share the NumberElement implementation with int
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_bool_cmp(self):
-         XML = self.XML
-         root = XML(_bytes('<root><b>false</b><b>true</b></root>'))
-@@ -2049,6 +2074,7 @@ class ObjectifyTestCase(HelperTestCase):
-                           before = [objectify.getRegisteredTypes()[0].name],
-                           after  = [objectify.getRegisteredTypes()[1].name])
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_registered_type_stringify(self):
-         from datetime import datetime
-         def parse_date(value):
-@@ -2519,46 +2545,55 @@ class ObjectifyTestCase(HelperTestCase):
- 
-     # E-Factory tests, need to use sub-elements as root element is always
-     # type-looked-up as ObjectifiedElement (no annotations)
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_int(self):
-         E = objectify.E
-         root = E.root(E.val(23))
-         self.assertTrue(isinstance(root.val, objectify.IntElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_float(self):
-         E = objectify.E
-         root = E.root(E.val(233.23))
-         self.assertTrue(isinstance(root.val, objectify.FloatElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_str(self):
-         E = objectify.E
-         root = E.root(E.val("what?"))
-         self.assertTrue(isinstance(root.val, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_unicode(self):
-         E = objectify.E
-         root = E.root(E.val(_str("blöödy häll", encoding="ISO-8859-1")))
-         self.assertTrue(isinstance(root.val, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_bool(self):
-         E = objectify.E
-         root = E.root(E.val(True))
-         self.assertTrue(isinstance(root.val, objectify.BoolElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_none(self):
-         E = objectify.E
-         root = E.root(E.val(None))
-         self.assertTrue(isinstance(root.val, objectify.NoneElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_value_concatenation(self):
-         E = objectify.E
-         root = E.root(E.val(1, "foo", 2.0, "bar ", True, None))
-         self.assertTrue(isinstance(root.val, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_attrib(self):
-         E = objectify.E
-         root = E.root(foo="bar")
-         self.assertEqual(root.get("foo"), "bar")
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_nested(self):
-         E = objectify.E
-         DataElement = objectify.DataElement
-@@ -2573,6 +2608,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertTrue(isinstance(root.value[0], objectify.IntElement))
-         self.assertTrue(isinstance(root.value[1], objectify.FloatElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_subtype(self):
-         class Attribute(objectify.ObjectifiedDataElement):
-             def __init__(self):
-@@ -2674,7 +2710,8 @@ def test_suite():
-     suite = unittest.TestSuite()
-     suite.addTests([unittest.makeSuite(ObjectifyTestCase)])
-     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
- 
- if __name__ == '__main__':
-diff --git a/src/lxml/tests/test_xpathevaluator.py b/src/lxml/tests/test_xpathevaluator.py
-index 13ee97ec..6d162c6d 100644
---- a/src/lxml/tests/test_xpathevaluator.py
-+++ b/src/lxml/tests/test_xpathevaluator.py
-@@ -8,7 +8,7 @@ from __future__ import absolute_import
- 
- import unittest, sys
- 
--from .common_imports import etree, HelperTestCase, _bytes, BytesIO, doctest, make_doctest
-+from .common_imports import etree, HelperTestCase, _bytes, BytesIO, doctest, make_doctest, IS_PYPY
- 
- 
- class ETreeXPathTestCase(HelperTestCase):
-@@ -740,8 +740,9 @@ def test_suite():
-         suite.addTests([unittest.makeSuite(ETreeXPathExsltTestCase)])
-     suite.addTests([unittest.makeSuite(ETreeETXPathClassTestCase)])
-     suite.addTests([doctest.DocTestSuite()])
--    suite.addTests(
--        [make_doctest('../../../doc/xpathxslt.txt')])
-+    if not IS_PYPY:
-+        suite.addTests(
-+            [make_doctest('../../../doc/xpathxslt.txt')])
-     return suite
- 
- if __name__ == '__main__':
-diff --git a/src/lxml/tests/test_xslt.py b/src/lxml/tests/test_xslt.py
-index cde23357..41f8d78b 100644
---- a/src/lxml/tests/test_xslt.py
-+++ b/src/lxml/tests/test_xslt.py
-@@ -17,6 +17,8 @@ from textwrap import dedent
- from tempfile import NamedTemporaryFile, mkdtemp
- 
- is_python3 = sys.version_info[0] >= 3
-+is_pypy = (getattr(sys, 'implementation', None) == 'pypy' or
-+           getattr(sys, 'pypy_version_info', None) is not None)
- 
- try:
-     unicode
-@@ -2085,8 +2087,9 @@ def test_suite():
-         suite.addTests([unittest.makeSuite(Py3XSLTTestCase)])
-     suite.addTests(
-         [make_doctest('../../../doc/extensions.txt')])
--    suite.addTests(
--        [make_doctest('../../../doc/xpathxslt.txt')])
-+    if not is_pypy:
-+        suite.addTests(
-+            [make_doctest('../../../doc/xpathxslt.txt')])
-     return suite
- 
- if __name__ == '__main__':
--- 
-2.25.0
-
-diff --git a/doc/element_classes.txt b/doc/element_classes.txt
-index 4b1e72e8..fda9ea07 100644
---- a/doc/element_classes.txt
-+++ b/doc/element_classes.txt
-@@ -576,10 +576,10 @@ subclasses for elements of this namespace:
- 
-   >>> print(honk_element[0].honk())
-   HONK
--  >>> print(honk_element[0].honking)
-+  >>> print(honk_element[0].honking)  # doctest: +ELLIPSIS
-   Traceback (most recent call last):
-   ...
--  AttributeError: 'HonkNSElement' object has no attribute 'honking'
-+  AttributeError: 'HonkNSElement' object has no attribute 'honking'...
- 
-   >>> print(honk_element[1].text)  # uses fallback for non-elements
-   comment
-

diff --git a/dev-python/lxml/files/lxml-4.9.2-py3.12-backport-unicode-fix.patch b/dev-python/lxml/files/lxml-4.9.2-py3.12-backport-unicode-fix.patch
deleted file mode 100644
index d1ca31d1b909..000000000000
--- a/dev-python/lxml/files/lxml-4.9.2-py3.12-backport-unicode-fix.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Upstream: https://github.com/lxml/lxml/commit/a1f2231dfdd31a37f2c55bc9ae4ac33e92221227
-
-From a1f2231dfdd31a37f2c55bc9ae4ac33e92221227 Mon Sep 17 00:00:00 2001
-From: Stefan Behnel <stefan_ml@behnel.de>
-Date: Fri, 12 May 2023 09:49:34 +0200
-Subject: [PATCH] Adapt unicode parsing to Py3.12.
-
----
- src/lxml/includes/etree_defs.h | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/src/lxml/includes/etree_defs.h b/src/lxml/includes/etree_defs.h
-index e671fa85d..d42f2158c 100644
---- a/src/lxml/includes/etree_defs.h
-+++ b/src/lxml/includes/etree_defs.h
-@@ -120,6 +120,16 @@ static PyObject* PyBytes_FromFormat(const char* format, ...) {
- #  define _lx_PySlice_GetIndicesEx(o, l, b, e, s, sl) PySlice_GetIndicesEx(((PySliceObject*)o), l, b, e, s, sl)
- #endif
- 
-+#if PY_VERSION_HEX >= 0x030B00A1
-+/* Python 3.12 doesn't have wstr Unicode strings any more. */
-+#undef PyUnicode_GET_DATA_SIZE
-+#define PyUnicode_GET_DATA_SIZE(ustr)  (0)
-+#undef PyUnicode_AS_DATA
-+#define PyUnicode_AS_DATA(ustr)  (NULL)
-+#undef PyUnicode_IS_READY
-+#define PyUnicode_IS_READY(ustr)  (1)
-+#endif
-+
- #ifdef WITHOUT_THREADING
- #  undef PyEval_SaveThread
- #  define PyEval_SaveThread() (NULL)
-

diff --git a/dev-python/lxml/files/lxml-4.9.2-py3.12-drop-deprecated-imp.patch b/dev-python/lxml/files/lxml-4.9.2-py3.12-drop-deprecated-imp.patch
deleted file mode 100644
index a59a60e74822..000000000000
--- a/dev-python/lxml/files/lxml-4.9.2-py3.12-drop-deprecated-imp.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-https://github.com/lxml/lxml/commit/07db761f9f027d1814a43686cda6fca26e37a931
-https://github.com/lxml/lxml/commit/c6b7e621e4696c02bf8f6ea423ffbbf2109748ab
-
-From 07db761f9f027d1814a43686cda6fca26e37a931 Mon Sep 17 00:00:00 2001
-From: Stefan Behnel <stefan_ml@behnel.de>
-Date: Thu, 11 May 2023 10:29:02 +0200
-Subject: [PATCH] Avoid using the deprecated "imp" module.
-
-Closes https://bugs.launchpad.net/lxml/+bug/2018137
---- a/src/lxml/html/tests/test_html5parser.py
-+++ b/src/lxml/html/tests/test_html5parser.py
-@@ -1,5 +1,4 @@
- import os
--import imp
- try:
-     from StringIO import StringIO
- except ImportError:                     # python 3
-@@ -45,7 +44,10 @@ def find_module(self, fullname, path=None):
-             return None
- 
-         def load_module(self, fullname):
--            mod = sys.modules.setdefault(fullname, imp.new_module(fullname))
-+            fake_module = object()
-+            fake_module.__qualname__ = fullname
-+            fake_module.__name__ = fullname.rsplit('.', 1)[-1]
-+            mod = sys.modules.setdefault(fullname, fake_module)
-             mod.__file__, mod.__loader__, mod.__path__ = "<dummy>", self, []
-             mod.__dict__.update(self.mocks[fullname])
-             return mod
-
-From c6b7e621e4696c02bf8f6ea423ffbbf2109748ab Mon Sep 17 00:00:00 2001
-From: Stefan Behnel <stefan_ml@behnel.de>
-Date: Thu, 11 May 2023 10:30:15 +0200
-Subject: [PATCH] Avoid using the deprecated "imp" module.
-
-Closes https://bugs.launchpad.net/lxml/+bug/2018137
---- a/src/lxml/html/tests/test_html5parser.py
-+++ b/src/lxml/html/tests/test_html5parser.py
-@@ -44,7 +44,8 @@ def find_module(self, fullname, path=None):
-             return None
- 
-         def load_module(self, fullname):
--            fake_module = object()
-+            class Cls: pass
-+            fake_module = Cls()
-             fake_module.__qualname__ = fullname
-             fake_module.__name__ = fullname.rsplit('.', 1)[-1]
-             mod = sys.modules.setdefault(fullname, fake_module)
-

diff --git a/dev-python/lxml/lxml-4.9.2-r1.ebuild b/dev-python/lxml/lxml-4.9.2-r1.ebuild
deleted file mode 100644
index e11d639a40b6..000000000000
--- a/dev-python/lxml/lxml-4.9.2-r1.ebuild
+++ /dev/null
@@ -1,116 +0,0 @@
-# Copyright 1999-2023 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 ~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.9.12-r2
-	>=dev-libs/libxslt-1.1.28
-"
-RDEPEND="
-	${DEPEND}
-"
-BDEPEND="
-	virtual/pkgconfig
-	<dev-python/cython-3[${PYTHON_USEDEP}]
-	>=dev-python/cython-0.29.29[${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}-4.6.0-tests-pypy.patch
-	"${FILESDIR}"/${P}-py3.12-drop-deprecated-imp.patch
-	"${FILESDIR}"/${P}-py3.12-backport-unicode-fix.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() {
-	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
-}

diff --git a/dev-python/lxml/lxml-4.9.2.ebuild b/dev-python/lxml/lxml-4.9.2.ebuild
deleted file mode 100644
index 113c02e07ba9..000000000000
--- a/dev-python/lxml/lxml-4.9.2.ebuild
+++ /dev/null
@@ -1,115 +0,0 @@
-# Copyright 1999-2023 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 ~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.9.12-r2
-	>=dev-libs/libxslt-1.1.28
-"
-RDEPEND="
-	${DEPEND}
-"
-BDEPEND="
-	virtual/pkgconfig
-	<dev-python/cython-3[${PYTHON_USEDEP}]
-	>=dev-python/cython-0.29.29[${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}-4.6.0-tests-pypy.patch
-	"${FILESDIR}"/${P}-py3.12-drop-deprecated-imp.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() {
-	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
-}

diff --git a/dev-python/lxml/lxml-4.9.3.ebuild b/dev-python/lxml/lxml-4.9.3.ebuild
deleted file mode 100644
index 0d937323afb9..000000000000
--- a/dev-python/lxml/lxml-4.9.3.ebuild
+++ /dev/null
@@ -1,114 +0,0 @@
-# Copyright 1999-2023 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[${PYTHON_USEDEP}]
-	>=dev-python/cython-0.29.29[${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}-4.9.3-tests-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() {
-	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
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/files/, dev-python/lxml/
@ 2023-11-16 18:25 Michał Górny
  0 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2023-11-16 18:25 UTC (permalink / raw
  To: gentoo-commits

commit:     a9f3e89119aa53d3f6cb9f4434f5f64fa76cbd03
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 16 18:25:02 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Nov 16 18:25:02 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a9f3e891

dev-python/lxml: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/lxml/Manifest                           |   1 -
 .../files/lxml-4.9.3-tests-py3.11-cython3.patch    |  10 -
 dev-python/lxml/files/lxml-4.9.3-tests-pypy.patch  | 424 ---------------------
 dev-python/lxml/lxml-4.9.3-r1.ebuild               | 116 ------
 4 files changed, 551 deletions(-)

diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
index a90d7b0650ac..a697a511ea4f 100644
--- a/dev-python/lxml/Manifest
+++ b/dev-python/lxml/Manifest
@@ -1,3 +1,2 @@
 DIST lxml-4.9.3-patches-2.tar.xz 24288 BLAKE2B 47b7c486a1c1616c875111bd53b14d4211a1eee3f412985f4022e71b85b087abd71d36919fb025257f17de404329284898ddc639f85e8b15ade21778fa218d98 SHA512 713172b4c907db6479a0a803a842824825b212a9b645c1ca356f793658bd6c63113ea248278e7c46b512e22e3130696e9fc5127fea82a67372d920733fc160b0
-DIST lxml-4.9.3-patches.tar.xz 10544 BLAKE2B 407938d2f701400e919110c3bfe84e94621f39f8178850c466d41549ee0eff4f23e93cdd8ea684713e8276acfaa05d6f7b7af4d375c859b9fc5b2981d60983a3 SHA512 c2d5d2ffb035aed6d846de84885b87142b2be7a09ffe6927e7c032acab343730acfcbefd75e8141cf3b41b308c532869a7878b515f3d4eeefa7526a3d2599398
 DIST lxml-4.9.3.gh.tar.gz 958628 BLAKE2B ffdf3fe781a03815f7c026229d313721c93375ebafad9b4a20c5d8a380a631401e546d8701a94d8c49615fb6a71e84940d8ca0299b47a37c1c9596db36659113 SHA512 903bd4935c7708b459aee9befcf3f6e3e3aaa9adc122591ea923b6e3d8fd288f07cab3f5f0edb08e3bf9db80414324f0a1a8e5a5089f9cda82f6c50f5df59423

diff --git a/dev-python/lxml/files/lxml-4.9.3-tests-py3.11-cython3.patch b/dev-python/lxml/files/lxml-4.9.3-tests-py3.11-cython3.patch
deleted file mode 100644
index 1fb466ab810f..000000000000
--- a/dev-python/lxml/files/lxml-4.9.3-tests-py3.11-cython3.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/src/lxml/tests/test_errors.py
-+++ b/src/lxml/tests/test_errors.py
-@@ -25,6 +25,7 @@ class ErrorTestCase(HelperTestCase):
-     def test_empty_parse(self):
-         self.assertRaises(etree.XMLSyntaxError, etree.fromstring, '')
- 
-+    @unittest.skipIf(sys.version_info >= (3, 11), "Known GC failure (https://bugzilla.redhat.com/show_bug.cgi?id=2051510)")
-     @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_element_cyclic_gc_none(self):
-         # test if cyclic reference can crash etree

diff --git a/dev-python/lxml/files/lxml-4.9.3-tests-pypy.patch b/dev-python/lxml/files/lxml-4.9.3-tests-pypy.patch
deleted file mode 100644
index 939e26e51242..000000000000
--- a/dev-python/lxml/files/lxml-4.9.3-tests-pypy.patch
+++ /dev/null
@@ -1,424 +0,0 @@
-From 1804702b5e3c85c1a16014d62365a29d0a6d0c75 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Thu, 30 Jan 2020 06:15:27 +0100
-Subject: [PATCH] Skip tests failing on PyPy
-
---- a/doc/element_classes.txt
-+++ b/doc/element_classes.txt
-@@ -576,10 +576,10 @@ subclasses for elements of this namespace:
- 
-   >>> print(honk_element[0].honk())
-   HONK
--  >>> print(honk_element[0].honking)
-+  >>> print(honk_element[0].honking)  # doctest: +ELLIPSIS
-   Traceback (most recent call last):
-   ...
--  AttributeError: 'HonkNSElement' object has no attribute 'honking'
-+  AttributeError: 'HonkNSElement' object has no attribute 'honking'...
- 
-   >>> print(honk_element[1].text)  # uses fallback for non-elements
-   comment
---- a/src/lxml/tests/test_elementtree.py
-+++ b/src/lxml/tests/test_elementtree.py
-@@ -26,7 +26,7 @@ from .common_imports import (
-     BytesIO, etree, HelperTestCase,
-     ElementTree, cElementTree, ET_VERSION, CET_VERSION,
-     filter_by_version, fileInTestDir, canonicalize, tmpfile,
--    _str, _bytes, unicode, IS_PYTHON2
-+    _str, _bytes, unicode, IS_PYTHON2, IS_PYPY
- )
- 
- if cElementTree is not None and (CET_VERSION <= (1,0,7) or sys.version_info[0] >= 3):
-@@ -2734,6 +2734,7 @@ class _ETreeTestCaseBase(HelperTestCase):
-         self.assertEqual('TEST', root2[0].get('{%s}a' % ns_href))
- 
-     required_versions_ET['test_register_namespace'] = (1,3)
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_register_namespace(self):
-         # ET 1.3+
-         Element = self.etree.Element
---- a/src/lxml/tests/test_errors.py
-+++ b/src/lxml/tests/test_errors.py
-@@ -11,7 +11,7 @@ import unittest
- import sys, gc, os.path
- from lxml import etree
- 
--from .common_imports import HelperTestCase
-+from .common_imports import HelperTestCase, IS_PYPY
- 
- 
- class ErrorTestCase(HelperTestCase):
-@@ -25,6 +25,7 @@ class ErrorTestCase(HelperTestCase):
-     def test_empty_parse(self):
-         self.assertRaises(etree.XMLSyntaxError, etree.fromstring, '')
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_element_cyclic_gc_none(self):
-         # test if cyclic reference can crash etree
-         Element = self.etree.Element
---- a/src/lxml/tests/test_http_io.py
-+++ b/src/lxml/tests/test_http_io.py
-@@ -11,10 +11,11 @@ import textwrap
- import sys
- 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
- 
- 
-+@unittest.skipIf(IS_PYPY, "broken on pypy")
- class HttpIOTestCase(HelperTestCase):
-     etree = etree
- 
---- a/src/lxml/tests/test_nsclasses.py
-+++ b/src/lxml/tests/test_nsclasses.py
-@@ -9,7 +9,7 @@ from __future__ import absolute_import
- 
- import unittest
- 
--from .common_imports import etree, HelperTestCase, _bytes, make_doctest
-+from .common_imports import etree, HelperTestCase, _bytes, make_doctest, IS_PYPY
- 
- class ETreeNamespaceClassesTestCase(HelperTestCase):
-     
-@@ -46,6 +46,7 @@ class ETreeNamespaceClassesTestCase(HelperTestCase):
-         self.Namespace('ns02').clear()
-         self.Namespace('ns03').clear()
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_ns_classes(self):
-         bluff_dict = {'bluff' : self.bluff_class}
-         maeh_dict  = {'maeh'  : self.maeh_class}
---- a/src/lxml/tests/test_objectify.py
-+++ b/src/lxml/tests/test_objectify.py
-@@ -11,7 +11,8 @@ import random
- 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
- )
- 
- from lxml import objectify
-@@ -215,11 +216,13 @@ class ObjectifyTestCase(HelperTestCase):
-         expected.update(DEFAULT_NSMAP)
-         self.assertEqual(root.value.nsmap, expected)
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_date_element_efactory_text(self):
-         # ObjectifiedDataElement can also be used as E-Factory
-         value = objectify.ObjectifiedDataElement('test', 'toast')
-         self.assertEqual(value.text, 'testtoast')
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_date_element_efactory_tail(self):
-         # ObjectifiedDataElement can also be used as E-Factory
-         value = objectify.ObjectifiedElement(objectify.ObjectifiedDataElement(), 'test', 'toast')
-@@ -376,6 +379,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertEqual("4", getattr(root.c1, "{}c2").text)
-         self.assertEqual("0", getattr(root.c1, "c2").text)
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_setattr(self):
-         for val in [
-             2, 2**32, 1.2, "Won't get fooled again", 
-@@ -811,6 +815,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertEqual(3, len(root.findall(".//b")))
-         self.assertEqual(2, len(root.findall("b")))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_build_tree(self):
-         root = self.Element('root')
-         root.a = 5
-@@ -840,6 +845,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertEqual(value, None)
-         self.assertEqual(value.get(XML_SCHEMA_NIL_ATTR), "true")
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_bool(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -877,6 +883,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertEqual(objectify.DataElement(False).text, "false")
-         self.assertEqual(objectify.DataElement(True).text, "true")
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_str(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -884,6 +891,7 @@ class ObjectifyTestCase(HelperTestCase):
-         root.s = "test"
-         self.assertTrue(isinstance(root.s, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_str_intliteral(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -891,6 +899,7 @@ class ObjectifyTestCase(HelperTestCase):
-         root.s = "3"
-         self.assertTrue(isinstance(root.s, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_str_floatliteral(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -898,6 +907,7 @@ class ObjectifyTestCase(HelperTestCase):
-         root.s = "3.72"
-         self.assertTrue(isinstance(root.s, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_str_mul(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -910,6 +920,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertRaises(TypeError, operator.mul, root.s, "honk")
-         self.assertRaises(TypeError, operator.mul, "honk", root.s)
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_str_add(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -920,6 +931,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertEqual("test" + s, root.s + s)
-         self.assertEqual(s + "test", s + root.s)
-             
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_str_mod(self):
-         s = "%d %f %s %r"
-         el = objectify.DataElement(s)
-@@ -985,6 +997,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertTrue(isinstance(value, objectify.StringElement))
-         self.assertEqual(value, "3.20")
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_ustr(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -992,6 +1005,7 @@ class ObjectifyTestCase(HelperTestCase):
-         root.s = _str("test")
-         self.assertTrue(isinstance(root.s, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_ustr_intliteral(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -999,6 +1013,7 @@ class ObjectifyTestCase(HelperTestCase):
-         root.s = _str("3")
-         self.assertTrue(isinstance(root.s, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_ustr_floatliteral(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -1006,6 +1021,7 @@ class ObjectifyTestCase(HelperTestCase):
-         root.s = _str("3.72")
-         self.assertTrue(isinstance(root.s, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_ustr_mul(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -1018,6 +1034,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertRaises(TypeError, operator.mul, root.s, _str("honk"))
-         self.assertRaises(TypeError, operator.mul, _str("honk"), root.s)
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_ustr_add(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -1043,6 +1060,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertTrue(isinstance(value, objectify.StringElement))
-         self.assertEqual(value, _str("3.20"))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_int(self):
-         Element = self.Element
-         root = Element("{objectified}root")
-@@ -1059,6 +1077,7 @@ class ObjectifyTestCase(HelperTestCase):
-         value = objectify.DataElement(123)
-         self.assertEqual(hash(value), hash(123))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_float(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -1075,6 +1094,7 @@ class ObjectifyTestCase(HelperTestCase):
-         value = objectify.DataElement(5.5)
-         self.assertEqual(hash(value), hash(5.5))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_float_precision(self):
-         # test not losing precision by shortened float str() value
-         # repr(2.305064300557): '2.305064300557'
-@@ -1094,6 +1114,7 @@ class ObjectifyTestCase(HelperTestCase):
-         s = "2.305064300557"
-         self.assertEqual(objectify.FloatElement(s), float(s))
-   
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_float_precision_consistency(self):
-         # test consistent FloatElement values for the different instantiation
-         # possibilities
-@@ -1180,6 +1201,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertEqual(value.text, None)
-         self.assertEqual(value.pyval, None)
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_unregistered(self):
-         Element = self.Element
-         SubElement = self.etree.SubElement
-@@ -1342,6 +1364,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertEqual(["why", "try"],
-                           strs)
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_str_cmp(self):
-         XML = self.XML
-         root = XML(_bytes('<root><b>test</b><b>taste</b><b></b><b/></root>'))
-@@ -1369,6 +1392,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertEqual(root.b, "")
-         self.assertEqual("", root.b)
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_int_cmp(self):
-         XML = self.XML
-         root = XML(_bytes('<root><b>5</b><b>6</b></root>'))
-@@ -1391,6 +1415,7 @@ class ObjectifyTestCase(HelperTestCase):
-         
-     # float + long share the NumberElement implementation with int
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_type_bool_cmp(self):
-         XML = self.XML
-         root = XML(_bytes('<root><b>false</b><b>true</b></root>'))
-@@ -2060,6 +2085,7 @@ class ObjectifyTestCase(HelperTestCase):
-                           before = [objectify.getRegisteredTypes()[0].name],
-                           after  = [objectify.getRegisteredTypes()[1].name])
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_registered_type_stringify(self):
-         from datetime import datetime
-         def parse_date(value):
-@@ -2530,46 +2556,55 @@ class ObjectifyTestCase(HelperTestCase):
- 
-     # E-Factory tests, need to use sub-elements as root element is always
-     # type-looked-up as ObjectifiedElement (no annotations)
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_int(self):
-         E = objectify.E
-         root = E.root(E.val(23))
-         self.assertTrue(isinstance(root.val, objectify.IntElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_float(self):
-         E = objectify.E
-         root = E.root(E.val(233.23))
-         self.assertTrue(isinstance(root.val, objectify.FloatElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_str(self):
-         E = objectify.E
-         root = E.root(E.val("what?"))
-         self.assertTrue(isinstance(root.val, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_unicode(self):
-         E = objectify.E
-         root = E.root(E.val(_str("blöödy häll", encoding="ISO-8859-1")))
-         self.assertTrue(isinstance(root.val, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_bool(self):
-         E = objectify.E
-         root = E.root(E.val(True))
-         self.assertTrue(isinstance(root.val, objectify.BoolElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_none(self):
-         E = objectify.E
-         root = E.root(E.val(None))
-         self.assertTrue(isinstance(root.val, objectify.NoneElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_value_concatenation(self):
-         E = objectify.E
-         root = E.root(E.val(1, "foo", 2.0, "bar ", True, None))
-         self.assertTrue(isinstance(root.val, objectify.StringElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_attrib(self):
-         E = objectify.E
-         root = E.root(foo="bar")
-         self.assertEqual(root.get("foo"), "bar")
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_nested(self):
-         E = objectify.E
-         DataElement = objectify.DataElement
-@@ -2584,6 +2619,7 @@ class ObjectifyTestCase(HelperTestCase):
-         self.assertTrue(isinstance(root.value[0], objectify.IntElement))
-         self.assertTrue(isinstance(root.value[1], objectify.FloatElement))
- 
-+    @unittest.skipIf(IS_PYPY, "broken on pypy")
-     def test_efactory_subtype(self):
-         class Attribute(objectify.ObjectifiedDataElement):
-             def __init__(self):
-@@ -2739,7 +2775,8 @@ def test_suite():
-     suite = unittest.TestSuite()
-     suite.addTests([unittest.makeSuite(ObjectifyTestCase)])
-     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
- 
- if __name__ == '__main__':
---- a/src/lxml/tests/test_xpathevaluator.py
-+++ b/src/lxml/tests/test_xpathevaluator.py
-@@ -8,7 +8,7 @@ from __future__ import absolute_import
- 
- import unittest, sys
- 
--from .common_imports import etree, HelperTestCase, _bytes, BytesIO, doctest, make_doctest
-+from .common_imports import etree, HelperTestCase, _bytes, BytesIO, doctest, make_doctest, IS_PYPY
- 
- 
- class ETreeXPathTestCase(HelperTestCase):
-@@ -740,8 +740,9 @@ def test_suite():
-         suite.addTests([unittest.makeSuite(ETreeXPathExsltTestCase)])
-     suite.addTests([unittest.makeSuite(ETreeETXPathClassTestCase)])
-     suite.addTests([doctest.DocTestSuite()])
--    suite.addTests(
--        [make_doctest('../../../doc/xpathxslt.txt')])
-+    if not IS_PYPY:
-+        suite.addTests(
-+            [make_doctest('../../../doc/xpathxslt.txt')])
-     return suite
- 
- if __name__ == '__main__':
---- a/src/lxml/tests/test_xslt.py
-+++ b/src/lxml/tests/test_xslt.py
-@@ -17,6 +17,8 @@ from textwrap import dedent
- from tempfile import NamedTemporaryFile, mkdtemp
- 
- is_python3 = sys.version_info[0] >= 3
-+is_pypy = (getattr(sys, 'implementation', None) == 'pypy' or
-+           getattr(sys, 'pypy_version_info', None) is not None)
- 
- try:
-     unicode
-@@ -2098,8 +2100,9 @@ def test_suite():
-         suite.addTests([unittest.makeSuite(Py3XSLTTestCase)])
-     suite.addTests(
-         [make_doctest('../../../doc/extensions.txt')])
--    suite.addTests(
--        [make_doctest('../../../doc/xpathxslt.txt')])
-+    if not is_pypy:
-+        suite.addTests(
-+            [make_doctest('../../../doc/xpathxslt.txt')])
-     return suite
- 
- if __name__ == '__main__':
--- 
-2.41.0

diff --git a/dev-python/lxml/lxml-4.9.3-r1.ebuild b/dev-python/lxml/lxml-4.9.3-r1.ebuild
deleted file mode 100644
index df72e6bd21ce..000000000000
--- a/dev-python/lxml/lxml-4.9.3-r1.ebuild
+++ /dev/null
@@ -1,116 +0,0 @@
-# Copyright 1999-2023 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
-	https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-4.9.3-patches.tar.xz
-"
-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-0.29.35[${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}-4.9.3-tests-pypy.patch
-	"${FILESDIR}"/${PN}-4.9.3-tests-py3.11-cython3.patch
-	"${WORKDIR}"/${PN}-4.9.3-patches
-)
-
-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() {
-	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
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/files/, dev-python/lxml/
@ 2024-01-09  8:09 Michał Górny
  0 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2024-01-09  8:09 UTC (permalink / raw
  To: gentoo-commits

commit:     f2286a8c1805e2f52bcbadec5125cd77e70cff33
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  9 07:02:55 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jan  9 08:08:59 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2286a8c

dev-python/lxml: Bump to 5.1.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/lxml/Manifest                    |   1 +
 dev-python/lxml/files/lxml-5.1.0-pypy.patch | 175 ++++++++++++++++++++++++++++
 dev-python/lxml/lxml-5.1.0.ebuild           | 117 +++++++++++++++++++
 3 files changed, 293 insertions(+)

diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
index 5819c17b57cb..01eaf3ac743a 100644
--- a/dev-python/lxml/Manifest
+++ b/dev-python/lxml/Manifest
@@ -3,3 +3,4 @@ DIST lxml-4.9.3.gh.tar.gz 958628 BLAKE2B ffdf3fe781a03815f7c026229d313721c93375e
 DIST lxml-4.9.4.gh.tar.gz 960009 BLAKE2B 7d31095dcf1f73c1026e7378e6adb19a053edc116b119ae415c3324134d3700822bf4611dc3cbf7c216d396e1404b143c8ebfdfb7e5a71b9ef6ec187898cc699 SHA512 528ef4ae057a7ee54d3193a042a6db500ada883d1d506829b6824d91ec979feb69ec79239420112eae0e08a437b2e5da8efc35feb5d04d119bfae2679e918d29
 DIST lxml-5.0.0.gh.tar.gz 964278 BLAKE2B 9c3f026b03bd671545cb039632af9bf1e8b94b8f8d4a20d0e4110f2b2d63cf0a46f983d0fa8eb71867ba9ac8cd46c949714dc7486faf01ecedae858e39799031 SHA512 6562bb68ea677fd9726adff1940034e364be0626dd1c086971cf0b271ca5caf98c96a3c465b98ede76f72248a40cf190fdc4f54c04c7e9c93e6408fde63fbfd3
 DIST lxml-5.0.1.gh.tar.gz 965422 BLAKE2B 4dfc17a0d3920a6785765f7bf5a35b578c8e62419ce6b5288a2899fcbf8b809a235a9b3b23abbcfa84ba5fcabb9ce7a838ff02f3f74e4ae5cb60850b951e3c23 SHA512 09ed4d9fd1396a0fbc2d7b14119545817497a85e632fde6239f6e66921926476e468a9ced227b6575519a2d1a5d03c858319386a5d739ff7aa3f68282d027b63
+DIST lxml-5.1.0.gh.tar.gz 962111 BLAKE2B 31c82eb198911d82fd9f7882bf94547b2367f3b3d1183eb8e8f97297b96faa69230d27b3367160b1f732a5d0878296b2d11787c3b220416c81a920e62ebec4f2 SHA512 1fadfeac1fb8b1e4fb1f7f2acb056865eb2567300a6c728eaede380d846ac75a6e33ebebcbbc6d60f54102152afd5dddf970058c4e27af396e9fa58e83c407a7

diff --git a/dev-python/lxml/files/lxml-5.1.0-pypy.patch b/dev-python/lxml/files/lxml-5.1.0-pypy.patch
new file mode 100644
index 000000000000..7b50b9d3062c
--- /dev/null
+++ b/dev-python/lxml/files/lxml-5.1.0-pypy.patch
@@ -0,0 +1,175 @@
+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

diff --git a/dev-python/lxml/lxml-5.1.0.ebuild b/dev-python/lxml/lxml-5.1.0.ebuild
new file mode 100644
index 000000000000..4fdfa9ff57e7
--- /dev/null
+++ b/dev-python/lxml/lxml-5.1.0.ebuild
@@ -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_{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.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
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/files/, dev-python/lxml/
@ 2024-07-02  5:00 Michał Górny
  0 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2024-07-02  5:00 UTC (permalink / raw
  To: gentoo-commits

commit:     94bc387c5a9d4e66559d40884044340216d5cf7a
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  2 04:29:36 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jul  2 05:00:40 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94bc387c

dev-python/lxml: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/lxml/Manifest                    |   4 -
 dev-python/lxml/files/lxml-5.1.0-pypy.patch | 175 ----------------------------
 dev-python/lxml/lxml-5.1.0.ebuild           | 117 -------------------
 dev-python/lxml/lxml-5.1.1.ebuild           | 117 -------------------
 dev-python/lxml/lxml-5.2.0.ebuild           | 128 --------------------
 dev-python/lxml/lxml-5.2.1.ebuild           | 126 --------------------
 6 files changed, 667 deletions(-)

diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
index 2c2267864959..8e6b184f8dd6 100644
--- a/dev-python/lxml/Manifest
+++ b/dev-python/lxml/Manifest
@@ -1,5 +1 @@
-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
-DIST lxml-5.2.1.gh.tar.gz 950408 BLAKE2B d0ad369f9d555a9bcdd92c71fb84063eba864c359d1ff27159c8f6de433bcce6915c9cff31aa7bd99de9aa54cb9a1d7ea7b3bb2526c755f8a38aaa21d9d30dfd SHA512 bd5ab005d617da588f87fa643245916e6963394b167f66991dce6443490692fcbf27620c2208b271bd8a1a97c79b09eedca2d1c6f02ba990a7d88d00ee43edfe
 DIST lxml-5.2.2.gh.tar.gz 950650 BLAKE2B d9e3bd96f386a808eca58ffa9a6b5a79e43102b7161fac9b97905de2bd22d21feaddb093e27463f597ef5378d754011c2999a38953e6288595b8dd171976688b SHA512 20b87a2d6e7ac82b6979d6fd18ecd5c224fec6eeee6b69d47a5bf2947ce53e6a517d1b86ab68836a5974f78ce86551ddc2317c1a7255932b418b98dc64d59376

diff --git a/dev-python/lxml/files/lxml-5.1.0-pypy.patch b/dev-python/lxml/files/lxml-5.1.0-pypy.patch
deleted file mode 100644
index 7b50b9d3062c..000000000000
--- a/dev-python/lxml/files/lxml-5.1.0-pypy.patch
+++ /dev/null
@@ -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

diff --git a/dev-python/lxml/lxml-5.1.0.ebuild b/dev-python/lxml/lxml-5.1.0.ebuild
deleted file mode 100644
index 09f1667e8875..000000000000
--- a/dev-python/lxml/lxml-5.1.0.ebuild
+++ /dev/null
@@ -1,117 +0,0 @@
-# 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.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
-}

diff --git a/dev-python/lxml/lxml-5.1.1.ebuild b/dev-python/lxml/lxml-5.1.1.ebuild
deleted file mode 100644
index adc0126c2821..000000000000
--- a/dev-python/lxml/lxml-5.1.1.ebuild
+++ /dev/null
@@ -1,117 +0,0 @@
-# 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.9[${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
-
-	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
-}

diff --git a/dev-python/lxml/lxml-5.2.0.ebuild b/dev-python/lxml/lxml-5.2.0.ebuild
deleted file mode 100644
index 9153f366839c..000000000000
--- a/dev-python/lxml/lxml-5.2.0.ebuild
+++ /dev/null
@@ -1,128 +0,0 @@
-# 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
-}

diff --git a/dev-python/lxml/lxml-5.2.1.ebuild b/dev-python/lxml/lxml-5.2.1.ebuild
deleted file mode 100644
index 48345b052c05..000000000000
--- a/dev-python/lxml/lxml-5.2.1.ebuild
+++ /dev/null
@@ -1,126 +0,0 @@
-# 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..13} 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
-
-	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
-	optfeature "Support for lxml.html.clean sanitizer" dev-python/lxml-html-clean
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-07-02  5:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-22 22:46 [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/files/, dev-python/lxml/ Lars Wendler
  -- strict thread matches above, loose matches on Subject: below --
2019-11-27  2:18 Patrick McLean
2020-10-17 19:01 Michał Górny
2020-11-27  8:43 Michał Górny
2021-12-11 23:24 Michał Górny
2023-05-25  3:18 Sam James
2023-06-06  5:34 Sam James
2023-10-25  5:54 Michał Górny
2023-11-16 18:25 Michał Górny
2024-01-09  8:09 Michał Górny
2024-07-02  5:00 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox