* [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/, dev-python/lxml/files/
@ 2015-09-25 7:11 Justin Lecher
0 siblings, 0 replies; 10+ messages in thread
From: Justin Lecher @ 2015-09-25 7:11 UTC (permalink / raw
To: gentoo-commits
commit: e2f37a65be374b22c9cb1377b98d0a7341aeac89
Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 25 07:09:07 2015 +0000
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Fri Sep 25 07:11:25 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2f37a65
dev-python/lxml: Drop old
Package-Manager: portage-2.2.21
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
dev-python/lxml/Manifest | 3 -
.../lxml/files/lxml-3.3.x-test_etree.py.patch | 14 ----
dev-python/lxml/lxml-3.3.5.ebuild | 77 ----------------------
dev-python/lxml/lxml-3.4.2.ebuild | 68 -------------------
dev-python/lxml/lxml-3.4.3.ebuild | 74 ---------------------
dev-python/lxml/lxml-3.4.4.ebuild | 2 +-
6 files changed, 1 insertion(+), 237 deletions(-)
diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
index 9799c2f..b45bfee 100644
--- a/dev-python/lxml/Manifest
+++ b/dev-python/lxml/Manifest
@@ -1,5 +1,2 @@
-DIST lxml-3.3.5.tar.gz 3467344 SHA256 6ad6949dc7eea744a30fba77a968dd5910f545220e58bcc813b9df5c793e318a SHA512 b6692565e95ae8856347a2cbef4d1a1614cbc34aa47fbea10cfb49f5d5690a21e577e53e7cfbe73db18190a6919a1055fe5ee5ccaf1d03dc2bc0c5cf2c81ef2e WHIRLPOOL f9e875085701264128d37458f5c03a1e6dfb0a6d3e49f88cfc90031a40f17dfb06ff57151729bb03f96d2959b1bae40b0617076ace7d695433fcd857d13ec697
DIST lxml-3.4.1.tar.gz 3524523 SHA256 069594837d0376a1bacf5cc42aa9a1be2e1c1396dc62f7d07f7358afecd34adf SHA512 ab669d1f9833e43b43ece4ef2481eebe22e9084ab07139f5c5c1fa6ea478177069d6ce96ece7eddef86982da418ec55a3785c4b78958f49f6ed415dc63af45ed WHIRLPOOL 5390f23aec3b7c07b9541f85ee5c674f267b99a9ef035cc5024d5f6defe6ee8ded500703b97b3f742f7630d25dbc538534654c8a3cddafb1ff37f5c5494bffb5
-DIST lxml-3.4.2.tar.gz 3526862 SHA256 c7d5990298af6ffb00312973a25f0cc917a6368126dd40eaab41d78d3e1ea25d SHA512 de57da48813cb6920937b23a82cf8fe389e0f215e3e5c4a873fae7a223d8df7fe693d835163cccedd23b538857ed8e5eb3f0d8e4e2c5ed33065c6fbb74604f10 WHIRLPOOL 0601d6474dad0b2dc6c47a906acc546e91e72b3e15bbf3d56d7f6c1ad2d46ae9e4007d775911ce2fef71ff06dba01d70d671379a079c92191aad13600a4e6a31
-DIST lxml-3.4.3.tar.gz 3541740 SHA256 6ce4a11ab485a67a899aa3e080c97b22a9df40c7077bd9146a821d3872cf2037 SHA512 9ce34fef03e19b13fd78f13562dba570018c6588c187452fa1a0e3db441c5583333e85386a56c243db6f0f03875b4be514f4e6084a386aa83a6e436fec992e4f WHIRLPOOL cfebfaa0a1cdb4cf9e451b0d3c7246fbf104bccd0511d4f4060862fdd88bd0699ce2b4e604afc5ae65cc037182565d8590cfe451c361ddecc4177fe09db0ffd7
DIST lxml-3.4.4.tar.gz 3537508 SHA256 b3d362bac471172747cda3513238f115cbd6c5f8b8e6319bf6a97a7892724099 SHA512 94453ff0562fc18a4b43555271e2469556255b69daf5f801d1a0f1ff29fd73f4b46d4faba9bfe86b42cfdac31005a0d3cfcbf230e0c7593dd5fc6461afcad906 WHIRLPOOL 6debafb391c94bd57510498c8261a511759f52feb3065c8bdf3103b177b1ddcbad54968f1eceac07b97e42087a1c59a060a3719f9ea9d25a662da34bf314b89e
diff --git a/dev-python/lxml/files/lxml-3.3.x-test_etree.py.patch b/dev-python/lxml/files/lxml-3.3.x-test_etree.py.patch
deleted file mode 100644
index 3c8667a..0000000
--- a/dev-python/lxml/files/lxml-3.3.x-test_etree.py.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- build/lib/lxml/tests/test_etree.py.orig 2015-03-15 17:01:51.337909343 +0100
-+++ build/lib/lxml/tests/test_etree.py 2015-03-15 17:04:25.059318388 +0100
-@@ -1225,6 +1225,11 @@
- root[0].attrib, {'default': 'valueB'})
-
- def test_resolve_filename_dtd_relative(self):
-+ # This test is broken as it tries to resolve a file path
-+ # with the file:// path convention and will fail.
-+ # So let's not waste our time here and return straight away.
-+ return
-+
- parse = self.etree.parse
- parser = self.etree.XMLParser(attribute_defaults=True)
- assertEqual = self.assertEqual
diff --git a/dev-python/lxml/lxml-3.3.5.ebuild b/dev-python/lxml/lxml-3.3.5.ebuild
deleted file mode 100644
index 3f2ee0e..0000000
--- a/dev-python/lxml/lxml-3.3.5.ebuild
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python{2_7,3_{3,4}} )
-inherit distutils-r1 eutils flag-o-matic
-
-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 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="beautifulsoup3 doc examples +threads"
-
-# Note: lib{xml2,xslt} are used as C libraries, not Python modules.
-RDEPEND="
- >=dev-libs/libxml2-2.7.2
- >=dev-libs/libxslt-1.1.15
- beautifulsoup3? (
- $(python_gen_cond_dep 'dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]' 'python2*')
- $(python_gen_cond_dep 'dev-python/beautifulsoup:python-3[${PYTHON_USEDEP}]' 'python3*')
- )"
-DEPEND="${RDEPEND}
- dev-python/setuptools[${PYTHON_USEDEP}]"
-# lxml tarball contains files pregenerated by Cython.
-
-DISTUTILS_IN_SOURCE_BUILD=1
-
-python_prepare_all() {
- # avoid replacing PYTHONPATH in tests.
- sed -i -e '/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
- 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
-
- OLDPWD=$(pwd)
- cd "${BUILD_DIR}" || die "can't cd into ${BUILD_DIR}"
-
- # Patching test files has to happen at this precise moment.
- # Not before, not after but now.
- epatch "${FILESDIR}"/lxml-3.3.x-test_etree.py.patch
-
- cd "${OLDPWD}"
-
- local test
- for test in test.py selftest.py selftest2.py; do
- einfo "Running ${test}"
- "${PYTHON}" ${test} || 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
-}
diff --git a/dev-python/lxml/lxml-3.4.2.ebuild b/dev-python/lxml/lxml-3.4.2.ebuild
deleted file mode 100644
index 17699a7..0000000
--- a/dev-python/lxml/lxml-3.4.2.ebuild
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python{2_7,3_3,3_4} )
-inherit distutils-r1 flag-o-matic
-
-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 ~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 ~arm64"
-IUSE="beautifulsoup3 doc examples +threads"
-
-# 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
- beautifulsoup3? (
- $(python_gen_cond_dep 'dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]' 'python2*')
- $(python_gen_cond_dep 'dev-python/beautifulsoup:python-3[${PYTHON_USEDEP}]' 'python3*')
- )"
-DEPEND="${RDEPEND}
- dev-python/setuptools[${PYTHON_USEDEP}]"
-# lxml tarball contains files pregenerated by Cython.
-
-DISTUTILS_IN_SOURCE_BUILD=1
-
-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
- 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} || 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
-}
diff --git a/dev-python/lxml/lxml-3.4.3.ebuild b/dev-python/lxml/lxml-3.4.3.ebuild
deleted file mode 100644
index 4aeedc9..0000000
--- a/dev-python/lxml/lxml-3.4.3.ebuild
+++ /dev/null
@@ -1,74 +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_{3,4} )
-
-inherit distutils-r1 flag-o-matic
-
-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 ~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 ~arm64"
-IUSE="beautifulsoup3 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
- beautifulsoup3? (
- $(python_gen_cond_dep 'dev-python/beautifulsoup:python-2[${PYTHON_USEDEP}]' 'python2*')
- $(python_gen_cond_dep 'dev-python/beautifulsoup:python-3[${PYTHON_USEDEP}]' 'python3*')
- )"
-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() {
- # 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
- 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
-}
diff --git a/dev-python/lxml/lxml-3.4.4.ebuild b/dev-python/lxml/lxml-3.4.4.ebuild
index a4ea22d..abc0032 100644
--- a/dev-python/lxml/lxml-3.4.4.ebuild
+++ b/dev-python/lxml/lxml-3.4.4.ebuild
@@ -73,6 +73,6 @@ python_install_all() {
}
pkg_postinst() {
- optfeature "Support for BeautifulSoup as a parser backend" dev-python/beautifulsoup-3*
+ 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] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/, dev-python/lxml/files/
@ 2015-11-13 13:20 Justin Lecher
0 siblings, 0 replies; 10+ messages in thread
From: Justin Lecher @ 2015-11-13 13:20 UTC (permalink / raw
To: gentoo-commits
commit: 8cf0e35e447302c8ea0760b68b6f5479060d6149
Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 13 13:20:33 2015 +0000
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Fri Nov 13 13:20:45 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8cf0e35e
dev-python/lxml: Version Bump
Package-Manager: portage-2.2.23
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
dev-python/lxml/Manifest | 1 +
.../lxml/files/lxml-3.5.0-cross-compile.patch | 39 ++++++++++++
dev-python/lxml/lxml-3.5.0.ebuild | 70 ++++++++++++++++++++++
3 files changed, 110 insertions(+)
diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
index b45bfee..2648d60 100644
--- a/dev-python/lxml/Manifest
+++ b/dev-python/lxml/Manifest
@@ -1,2 +1,3 @@
DIST lxml-3.4.1.tar.gz 3524523 SHA256 069594837d0376a1bacf5cc42aa9a1be2e1c1396dc62f7d07f7358afecd34adf SHA512 ab669d1f9833e43b43ece4ef2481eebe22e9084ab07139f5c5c1fa6ea478177069d6ce96ece7eddef86982da418ec55a3785c4b78958f49f6ed415dc63af45ed WHIRLPOOL 5390f23aec3b7c07b9541f85ee5c674f267b99a9ef035cc5024d5f6defe6ee8ded500703b97b3f742f7630d25dbc538534654c8a3cddafb1ff37f5c5494bffb5
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
diff --git a/dev-python/lxml/files/lxml-3.5.0-cross-compile.patch b/dev-python/lxml/files/lxml-3.5.0-cross-compile.patch
new file mode 100644
index 0000000..54e4087
--- /dev/null
+++ b/dev-python/lxml/files/lxml-3.5.0-cross-compile.patch
@@ -0,0 +1,39 @@
+ setupinfo.py | 18 +++---------------
+ 1 file changed, 3 insertions(+), 15 deletions(-)
+
+diff --git a/setupinfo.py b/setupinfo.py
+index e04c38f..0549eaa 100644
+--- a/setupinfo.py
++++ b/setupinfo.py
+@@ -93,19 +93,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")
+-
+ base_dir = get_base_dir()
+ _include_dirs = _prefer_reldirs(
+ base_dir, include_dirs(static_include_dirs) + [INCLUDE_PACKAGE_PATH])
+@@ -358,8 +345,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, 'libxxlt', '--%s' % option)
+
+ flag_list = xml2_flags.split()
+ for flag in xslt_flags.split():
diff --git a/dev-python/lxml/lxml-3.5.0.ebuild b/dev-python/lxml/lxml-3.5.0.ebuild
new file mode 100644
index 0000000..e3fb856
--- /dev/null
+++ b/dev-python/lxml/lxml-3.5.0.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{3,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] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/, dev-python/lxml/files/
@ 2016-10-14 21:30 David Seifert
0 siblings, 0 replies; 10+ messages in thread
From: David Seifert @ 2016-10-14 21:30 UTC (permalink / raw
To: gentoo-commits
commit: 7431927890255ab19e98f69ee6ed65962baf61cc
Author: Mathy Vanvoorden <mathy <AT> vanvoorden <DOT> be>
AuthorDate: Tue Oct 11 21:30:09 2016 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Fri Oct 14 21:29:23 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74319278
dev-python/lxml: disable broken test-case, EAPI upgrade
There is a test-case not working because of issues in
libxml2. The patch disables the one broken test-case
until upstream can fix it.
Upstream bug: https://bugs.launchpad.net/lxml/+bug/1608479
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=592860
Package-Manager: portage-2.3.0
Closes: https://github.com/gentoo/gentoo/pull/2539
Signed-off-by: David Seifert <soap <AT> gentoo.org>
.../lxml/files/lxml-3.6.4-fix-test_xmlschema.patch | 36 ++++++++++++++++++++++
dev-python/lxml/lxml-3.6.4-r1.ebuild | 23 ++++++++++----
2 files changed, 53 insertions(+), 6 deletions(-)
diff --git a/dev-python/lxml/files/lxml-3.6.4-fix-test_xmlschema.patch b/dev-python/lxml/files/lxml-3.6.4-fix-test_xmlschema.patch
new file mode 100644
index 00000000..13f963a
--- /dev/null
+++ b/dev-python/lxml/files/lxml-3.6.4-fix-test_xmlschema.patch
@@ -0,0 +1,36 @@
+diff --git a/src/lxml/tests/test_xmlschema.py b/src/lxml/tests/test_xmlschema.py
+index 26d8432..b41c097 100644
+--- a/src/lxml/tests/test_xmlschema.py
++++ b/src/lxml/tests/test_xmlschema.py
+@@ -168,31 +168,6 @@ class ETreeXMLSchemaTestCase(HelperTestCase):
+ self.assertEqual('ho', root[2].get('hardy'))
+ self.assertEqual('hey', root[3].get('hardy'))
+
+- def test_xmlschema_parse_fixed_attributes(self):
+- # does not work as of libxml2 2.7.3
+- schema = self.parse('''
+-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+- <xsd:element name="a" type="AType"/>
+- <xsd:complexType name="AType">
+- <xsd:sequence minOccurs="3" maxOccurs="3">
+- <xsd:element name="b" type="BType" />
+- </xsd:sequence>
+- </xsd:complexType>
+- <xsd:complexType name="BType">
+- <xsd:attribute name="hardy" type="xsd:string" fixed="hey" />
+- </xsd:complexType>
+-</xsd:schema>
+-''')
+- schema = etree.XMLSchema(schema)
+- parser = etree.XMLParser(schema=schema, attribute_defaults=True)
+-
+- tree_valid = self.parse('<a><b/><b hardy="hey"/><b/></a>',
+- parser=parser)
+- root = tree_valid.getroot()
+- self.assertEqual('hey', root[0].get('hardy'))
+- self.assertEqual('hey', root[1].get('hardy'))
+- self.assertEqual('hey', root[2].get('hardy'))
+-
+ def test_xmlschema_stringio(self):
+ schema_file = BytesIO('''
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
diff --git a/dev-python/lxml/lxml-3.6.4-r1.ebuild b/dev-python/lxml/lxml-3.6.4-r1.ebuild
index e7102f6..5e963ca 100644
--- a/dev-python/lxml/lxml-3.6.4-r1.ebuild
+++ b/dev-python/lxml/lxml-3.6.4-r1.ebuild
@@ -2,9 +2,9 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI=5
+EAPI=6
-PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
+PYTHON_COMPAT=( python2_7 python3_{4,5} )
inherit distutils-r1 eutils flag-o-matic toolchain-funcs
@@ -28,7 +28,15 @@ DEPEND="${RDEPEND}
DISTUTILS_IN_SOURCE_BUILD=1
-PATCHES=( "${FILESDIR}"/${PN}-3.5.0-cross-compile.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.5.0-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.
@@ -39,7 +47,7 @@ python_prepare_all() {
python_compile() {
if [[ ${EPYTHON} != python3* ]]; then
- local CFLAGS=${CFLAGS}
+ local -x CFLAGS="${CFLAGS}"
append-cflags -fno-strict-aliasing
fi
tc-export PKG_CONFIG
@@ -51,7 +59,7 @@ python_test() {
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}"
+ "${EPYTHON}" test.py -vv --all-levels -p || die "Test ${test} fails with ${EPYTHON}"
}
python_install_all() {
@@ -59,7 +67,10 @@ python_install_all() {
local DOCS=( *.txt doc/*.txt )
local HTML_DOCS=( doc/html/. )
fi
- use examples && local EXAMPLES=( samples/. )
+ if use examples; then
+ docinto examples
+ dodoc -r samples/.
+ fi
distutils-r1_python_install_all
}
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/, dev-python/lxml/files/
@ 2019-01-07 20:44 Virgil Dupras
0 siblings, 0 replies; 10+ messages in thread
From: Virgil Dupras @ 2019-01-07 20:44 UTC (permalink / raw
To: gentoo-commits
commit: 5017aebd8f4aaa096076cdde32a039188b6702b6
Author: Virgil Dupras <vdupras <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 7 20:44:33 2019 +0000
Commit: Virgil Dupras <vdupras <AT> gentoo <DOT> org>
CommitDate: Mon Jan 7 20:44:33 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5017aebd
dev-python/lxml: remove old
Bug: https://bugs.gentoo.org/672874
Signed-off-by: Virgil Dupras <vdupras <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
dev-python/lxml/Manifest | 2 -
.../lxml/files/lxml-3.6.4-fix-test_xmlschema.patch | 36 ----------
dev-python/lxml/lxml-4.1.1.ebuild | 80 ---------------------
dev-python/lxml/lxml-4.2.6.ebuild | 82 ----------------------
4 files changed, 200 deletions(-)
diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
index 6eedd3b84dc..a43d771a507 100644
--- a/dev-python/lxml/Manifest
+++ b/dev-python/lxml/Manifest
@@ -1,4 +1,2 @@
-DIST lxml-4.1.1.tar.gz 2380804 BLAKE2B 4d3c4ef0472c7af7bb4185142a8274b596dd55a908d41f5295d0a78031a7efb3aef8893ca739f8db0675e44d4b0c346746a2758d31a54825c06a153203599ab9 SHA512 9542e5206f9b2f9e072c52ef8e6cf44d1aaae8ae3e7ca7e820c1fac12e716503308ccb3cebc52155b4c93799f3ebca247781fc491524d004378bd26f5cddb9d1
DIST lxml-4.2.5.tar.gz 4414081 BLAKE2B c1c75a0a0c33011e2becb729de2c15dd786dd12bddeba4f2f26032d0d17104f258b471f5f961cbf96340df66cbce3e874d7a16c59731af280a309132b669d1b9 SHA512 4cf336d3e1471e8a26492760a143881517d12eb1c2dad82f8786540471bfabd68f8c795d97b7362166418c2be3c7996816638fdbd5a594536b9981478b90fdfe
-DIST lxml-4.2.6.tar.gz 2398161 BLAKE2B 3849a0a570b190a33bfb183507f81e106a1ab30352d959fdf5989c671d6f63f7286163bac3d141f80d34c43c4afef229145ba24da110f28b0ea279d050d9758e SHA512 40ef47f8a647a299bad5ff9500ebfad057be7707287d271a6310e66169f598bd1248e5702a5dcda6b93c87775f25596c502fe9ab804bf9157bfcae977cfb5f43
DIST lxml-4.3.0.tar.gz 2483162 BLAKE2B 3f3646a47a0344af22bfb567a0985a27e8a46051850e99b5e82d0bc59c94c0e9b19ca93cf6d5d790599e81c9513686c3462ad6544ad658d0efd77ad431b07014 SHA512 49d122c8a6dafe50195bc8cfb3ea52780054a57762132c000cd976fdbdbabaab6bc8b95b77d124ae144f33c24d71793a2debbebf789d5ca866734a984edac8bb
diff --git a/dev-python/lxml/files/lxml-3.6.4-fix-test_xmlschema.patch b/dev-python/lxml/files/lxml-3.6.4-fix-test_xmlschema.patch
deleted file mode 100644
index 13f963ab2e2..00000000000
--- a/dev-python/lxml/files/lxml-3.6.4-fix-test_xmlschema.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-diff --git a/src/lxml/tests/test_xmlschema.py b/src/lxml/tests/test_xmlschema.py
-index 26d8432..b41c097 100644
---- a/src/lxml/tests/test_xmlschema.py
-+++ b/src/lxml/tests/test_xmlschema.py
-@@ -168,31 +168,6 @@ class ETreeXMLSchemaTestCase(HelperTestCase):
- self.assertEqual('ho', root[2].get('hardy'))
- self.assertEqual('hey', root[3].get('hardy'))
-
-- def test_xmlschema_parse_fixed_attributes(self):
-- # does not work as of libxml2 2.7.3
-- schema = self.parse('''
--<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-- <xsd:element name="a" type="AType"/>
-- <xsd:complexType name="AType">
-- <xsd:sequence minOccurs="3" maxOccurs="3">
-- <xsd:element name="b" type="BType" />
-- </xsd:sequence>
-- </xsd:complexType>
-- <xsd:complexType name="BType">
-- <xsd:attribute name="hardy" type="xsd:string" fixed="hey" />
-- </xsd:complexType>
--</xsd:schema>
--''')
-- schema = etree.XMLSchema(schema)
-- parser = etree.XMLParser(schema=schema, attribute_defaults=True)
--
-- tree_valid = self.parse('<a><b/><b hardy="hey"/><b/></a>',
-- parser=parser)
-- root = tree_valid.getroot()
-- self.assertEqual('hey', root[0].get('hardy'))
-- self.assertEqual('hey', root[1].get('hardy'))
-- self.assertEqual('hey', root[2].get('hardy'))
--
- def test_xmlschema_stringio(self):
- schema_file = BytesIO('''
- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
diff --git a/dev-python/lxml/lxml-4.1.1.ebuild b/dev-python/lxml/lxml-4.1.1.ebuild
deleted file mode 100644
index c2534ff1fe5..00000000000
--- a/dev-python/lxml/lxml-4.1.1.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy )
-
-inherit distutils-r1 eutils flag-o-matic 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="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 ~x64-cygwin ~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}"/${PN}-3.5.0-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-4.2.6.ebuild b/dev-python/lxml/lxml-4.2.6.ebuild
deleted file mode 100644
index 8a7036a0c96..00000000000
--- a/dev-python/lxml/lxml-4.2.6.ebuild
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} pypy )
-
-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="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 ~x64-cygwin ~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.5
- >=dev-libs/libxslt-1.1.28"
-DEPEND="${RDEPEND}"
-BDEPEND="
- virtual/pkgconfig
- dev-python/setuptools[${PYTHON_USEDEP}]
- test? ( dev-python/cssselect[${PYTHON_USEDEP}] )
- "
-
-DISTUTILS_IN_SOURCE_BUILD=1
-
-PATCHES=(
- "${FILESDIR}"/${PN}-3.5.0-cross-compile.patch
-)
-
-python_prepare_all() {
- # avoid replacing PYTHONPATH in tests.
- sed -i -e '/sys\.path/d' test.py || die
-
- # apparently logs have changed with libxslt upgrade
- # https://bugs.launchpad.net/lxml/+bug/1782078
- sed -i -e '/assertEqual(4, len(log)/d' src/lxml/tests/test_threading.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] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/, dev-python/lxml/files/
@ 2020-01-30 5:54 Michał Górny
0 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2020-01-30 5:54 UTC (permalink / raw
To: gentoo-commits
commit: 53e86762297eaa48726af01a24e826c2567b35a2
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 30 05:18:50 2020 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jan 30 05:18:50 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53e86762
dev-python/lxml: Bump to 4.5.0
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.0.ebuild | 82 ++++
3 files changed, 517 insertions(+)
diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
index 289b42a9f0b..e573ca5efae 100644
--- a/dev-python/lxml/Manifest
+++ b/dev-python/lxml/Manifest
@@ -1,3 +1,4 @@
DIST lxml-4.3.3.tar.gz 4378439 BLAKE2B 30c2a29e58951164fbff1c9d23362d46987c86b671e0cfa6cf15cbbb3db23ead856786babe57ce553f7b8a66d8ac333410ea1bb3b8b521aac43a038b90daf488 SHA512 cbc1cd30bac4b9ac845d99949c8c231a7870398f942695df5a00586d70d0f6b6ebd457a1a9306806af7d0fd521a14c54d266902943263927a0d940abc3cdf5c0
DIST lxml-4.4.2.tar.gz 940286 BLAKE2B 28366d1673b356f980cedc64839f070e8166906705bc948af24bba369153accc0a4cea0372e87530227be88a89a0dab4d23308b75fd695f55fdb73e6326aa03b SHA512 af6608df7e47513644b841ecb6291e655122927cb439bd2ae694fd344cf5dca621e3e1ce6b40accc6db9e0c4383b5b3e6c6f9ff19f35c4daf30f119a217113ca
DIST lxml-4.4.3.tar.gz 940482 BLAKE2B 9ece0314d7b8ef82d70e83f6b77e4abef99d486a0168497f1f97e6a93d81d58e522e259d3569373d2429ac3190a642e8d1107dbae29ca20ec56636f7576545b6 SHA512 7b07450a243595bd412a43e73a55fafda0e6a6e41ed47c5488ee8e6cbd04d48a93db1b06f8b646bdc6377cad063aa53781cf41e3048f9dd7a62ccecc20900298
+DIST lxml-4.5.0.tar.gz 942013 BLAKE2B 24535fb74c58baff26c47c4bfe4ade0155044b30d099f1990c11406eca34e6bb8255631e5b30172adcf95fc61d1ab9d0384dbf9910c7694beed11cbb99595008 SHA512 b4b4692cffb7b8d074e72033711e17df2529d0747c4d086926855bb5a39478e7aea2bc195d201ca3c252822b231dbe47aaedc647e50bbd6b24754668beaa60ca
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
new file mode 100644
index 00000000000..5f8cad9063f
--- /dev/null
+++ b/dev-python/lxml/files/lxml-4.5.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, 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.0.ebuild b/dev-python/lxml/lxml-4.5.0.ebuild
new file mode 100644
index 00000000000..669878e08cd
--- /dev/null
+++ b/dev-python/lxml/lxml-4.5.0.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{6,7,8} pypy3 )
+
+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"
+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 ~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
+ dev-python/cython[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? ( dev-python/cssselect[${PYTHON_USEDEP}] )
+ "
+
+DISTUTILS_IN_SOURCE_BUILD=1
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.5.0-cross-compile.patch
+ "${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] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/, dev-python/lxml/files/
@ 2020-05-26 10:35 Michał Górny
0 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2020-05-26 10:35 UTC (permalink / raw
To: gentoo-commits
commit: 780610d29e0923d7d99b2c9ed93d7eb2b30fa3e9
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue May 26 10:20:52 2020 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue May 26 10:35:45 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=780610d2
dev-python/lxml: Port to py39
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/lxml/files/lxml-4.5.1-py39.patch | 620 ++++++++++++++++++++++++++++
dev-python/lxml/lxml-4.5.1.ebuild | 3 +-
2 files changed, 622 insertions(+), 1 deletion(-)
diff --git a/dev-python/lxml/files/lxml-4.5.1-py39.patch b/dev-python/lxml/files/lxml-4.5.1-py39.patch
new file mode 100644
index 00000000000..3032e537927
--- /dev/null
+++ b/dev-python/lxml/files/lxml-4.5.1-py39.patch
@@ -0,0 +1,620 @@
+From e5c5cd22d918cd3b196e109a7829dad02d9ef42e Mon Sep 17 00:00:00 2001
+From: Stefan Behnel <stefan_ml@behnel.de>
+Date: Tue, 26 May 2020 11:20:18 +0200
+Subject: [PATCH 1/2] Move some ElementTree compatibility tests over to the
+ etree-only tests since the features were removed in Py3.9.
+
+---
+ src/lxml/tests/test_elementtree.py | 254 +----------------------------
+ src/lxml/tests/test_etree.py | 246 ++++++++++++++++++++++++++++
+ 2 files changed, 252 insertions(+), 248 deletions(-)
+
+diff --git a/src/lxml/tests/test_elementtree.py b/src/lxml/tests/test_elementtree.py
+index 78d8964d..ec765ee0 100644
+--- a/src/lxml/tests/test_elementtree.py
++++ b/src/lxml/tests/test_elementtree.py
+@@ -130,7 +130,8 @@ class _ETreeTestCaseBase(HelperTestCase):
+ check_method(element.extend)
+ check_method(element.insert)
+ check_method(element.remove)
+- check_method(element.getchildren)
++ # Removed in Py3.9
++ #check_method(element.getchildren)
+ check_method(element.find)
+ check_method(element.iterfind)
+ check_method(element.findall)
+@@ -142,7 +143,8 @@ class _ETreeTestCaseBase(HelperTestCase):
+ check_method(element.items)
+ check_method(element.iter)
+ check_method(element.itertext)
+- check_method(element.getiterator)
++ # Removed in Py3.9
++ #check_method(element.getiterator)
+
+ # These methods return an iterable. See bug 6472.
+
+@@ -1933,28 +1935,6 @@ class _ETreeTestCaseBase(HelperTestCase):
+ a.remove(el)
+ self.assertLess(len(a), 3)
+
+- def test_getchildren(self):
+- Element = self.etree.Element
+- SubElement = self.etree.SubElement
+-
+- a = Element('a')
+- b = SubElement(a, 'b')
+- c = SubElement(a, 'c')
+- d = SubElement(b, 'd')
+- e = SubElement(c, 'e')
+- self.assertXML(
+- _bytes('<a><b><d></d></b><c><e></e></c></a>'),
+- a)
+- self.assertEqual(
+- [b, c],
+- a.getchildren())
+- self.assertEqual(
+- [d],
+- b.getchildren())
+- self.assertEqual(
+- [],
+- d.getchildren())
+-
+ def test_makeelement(self):
+ Element = self.etree.Element
+
+@@ -2010,184 +1990,6 @@ class _ETreeTestCaseBase(HelperTestCase):
+ [None] * 5,
+ [el.tail for el in a.iter()])
+
+- def test_getiterator(self):
+- Element = self.etree.Element
+- SubElement = self.etree.SubElement
+-
+- a = Element('a')
+- b = SubElement(a, 'b')
+- c = SubElement(a, 'c')
+- d = SubElement(b, 'd')
+- e = SubElement(c, 'e')
+-
+- self.assertEqual(
+- [a, b, d, c, e],
+- list(a.getiterator()))
+- self.assertEqual(
+- [d],
+- list(d.getiterator()))
+-
+- def test_getiterator_empty(self):
+- Element = self.etree.Element
+- SubElement = self.etree.SubElement
+-
+- a = Element('a')
+- b = SubElement(a, 'b')
+- c = SubElement(a, 'c')
+- d = SubElement(b, 'd')
+- e = SubElement(c, 'e')
+-
+- self.assertEqual(
+- [],
+- list(a.getiterator('none')))
+- self.assertEqual(
+- [],
+- list(e.getiterator('none')))
+- self.assertEqual(
+- [e],
+- list(e.getiterator()))
+-
+- def test_getiterator_filter(self):
+- Element = self.etree.Element
+- SubElement = self.etree.SubElement
+-
+- a = Element('a')
+- b = SubElement(a, 'b')
+- c = SubElement(a, 'c')
+- d = SubElement(b, 'd')
+- e = SubElement(c, 'e')
+-
+- self.assertEqual(
+- [a],
+- list(a.getiterator('a')))
+- a2 = SubElement(e, 'a')
+- self.assertEqual(
+- [a, a2],
+- list(a.getiterator('a')))
+- self.assertEqual(
+- [a2],
+- list(c.getiterator('a')))
+-
+- def test_getiterator_filter_all(self):
+- Element = self.etree.Element
+- SubElement = self.etree.SubElement
+-
+- a = Element('a')
+- b = SubElement(a, 'b')
+- c = SubElement(a, 'c')
+- d = SubElement(b, 'd')
+- e = SubElement(c, 'e')
+-
+- self.assertEqual(
+- [a, b, d, c, e],
+- list(a.getiterator('*')))
+-
+- def test_getiterator_filter_comment(self):
+- Element = self.etree.Element
+- Comment = self.etree.Comment
+- SubElement = self.etree.SubElement
+-
+- a = Element('a')
+- b = SubElement(a, 'b')
+- comment_b = Comment("TEST-b")
+- b.append(comment_b)
+-
+- self.assertEqual(
+- [comment_b],
+- list(a.getiterator(Comment)))
+-
+- comment_a = Comment("TEST-a")
+- a.append(comment_a)
+-
+- self.assertEqual(
+- [comment_b, comment_a],
+- list(a.getiterator(Comment)))
+-
+- self.assertEqual(
+- [comment_b],
+- list(b.getiterator(Comment)))
+-
+- def test_getiterator_filter_pi(self):
+- Element = self.etree.Element
+- PI = self.etree.ProcessingInstruction
+- SubElement = self.etree.SubElement
+-
+- a = Element('a')
+- b = SubElement(a, 'b')
+- pi_b = PI("TEST-b")
+- b.append(pi_b)
+-
+- self.assertEqual(
+- [pi_b],
+- list(a.getiterator(PI)))
+-
+- pi_a = PI("TEST-a")
+- a.append(pi_a)
+-
+- self.assertEqual(
+- [pi_b, pi_a],
+- list(a.getiterator(PI)))
+-
+- self.assertEqual(
+- [pi_b],
+- list(b.getiterator(PI)))
+-
+- def test_getiterator_with_text(self):
+- Element = self.etree.Element
+- SubElement = self.etree.SubElement
+-
+- a = Element('a')
+- a.text = 'a'
+- b = SubElement(a, 'b')
+- b.text = 'b'
+- b.tail = 'b1'
+- c = SubElement(a, 'c')
+- c.text = 'c'
+- c.tail = 'c1'
+- d = SubElement(b, 'd')
+- d.text = 'd'
+- d.tail = 'd1'
+- e = SubElement(c, 'e')
+- e.text = 'e'
+- e.tail = 'e1'
+-
+- self.assertEqual(
+- [a, b, d, c, e],
+- list(a.getiterator()))
+- #self.assertEqual(
+- # [d],
+- # list(d.getiterator()))
+-
+- def test_getiterator_filter_with_text(self):
+- Element = self.etree.Element
+- SubElement = self.etree.SubElement
+-
+- a = Element('a')
+- a.text = 'a'
+- b = SubElement(a, 'b')
+- b.text = 'b'
+- b.tail = 'b1'
+- c = SubElement(a, 'c')
+- c.text = 'c'
+- c.tail = 'c1'
+- d = SubElement(b, 'd')
+- d.text = 'd'
+- d.tail = 'd1'
+- e = SubElement(c, 'e')
+- e.text = 'e'
+- e.tail = 'e1'
+-
+- self.assertEqual(
+- [a],
+- list(a.getiterator('a')))
+- a2 = SubElement(e, 'a')
+- self.assertEqual(
+- [a, a2],
+- list(a.getiterator('a')))
+- self.assertEqual(
+- [a2],
+- list(e.getiterator('a')))
+-
+ def test_getslice(self):
+ Element = self.etree.Element
+ SubElement = self.etree.SubElement
+@@ -2710,41 +2512,6 @@ class _ETreeTestCaseBase(HelperTestCase):
+ self.assertEqual('A2',
+ a.tail)
+
+- def test_elementtree_getiterator(self):
+- Element = self.etree.Element
+- SubElement = self.etree.SubElement
+- ElementTree = self.etree.ElementTree
+-
+- a = Element('a')
+- b = SubElement(a, 'b')
+- c = SubElement(a, 'c')
+- d = SubElement(b, 'd')
+- e = SubElement(c, 'e')
+- t = ElementTree(element=a)
+-
+- self.assertEqual(
+- [a, b, d, c, e],
+- list(t.getiterator()))
+-
+- def test_elementtree_getiterator_filter(self):
+- Element = self.etree.Element
+- SubElement = self.etree.SubElement
+- ElementTree = self.etree.ElementTree
+- a = Element('a')
+- b = SubElement(a, 'b')
+- c = SubElement(a, 'c')
+- d = SubElement(b, 'd')
+- e = SubElement(c, 'e')
+- t = ElementTree(element=a)
+-
+- self.assertEqual(
+- [a],
+- list(t.getiterator('a')))
+- a2 = SubElement(e, 'a')
+- self.assertEqual(
+- [a, a2],
+- list(t.getiterator('a')))
+-
+ def test_ns_access(self):
+ ElementTree = self.etree.ElementTree
+ ns = 'http://xml.infrae.com/1'
+@@ -3180,17 +2947,6 @@ class _ETreeTestCaseBase(HelperTestCase):
+ 'value',
+ root[0].get(attr_name))
+
+- def test_iterparse_getiterator(self):
+- iterparse = self.etree.iterparse
+- f = BytesIO('<a><b><d/></b><c/></a>')
+-
+- counts = []
+- for event, elem in iterparse(f):
+- counts.append(len(list(elem.getiterator())))
+- self.assertEqual(
+- [1,2,1,4],
+- counts)
+-
+ def test_iterparse_move_elements(self):
+ iterparse = self.etree.iterparse
+ f = BytesIO('<a><b><d/></b><c/></a>')
+@@ -5119,6 +4875,8 @@ if ElementTree:
+
+ @classmethod
+ def setUpClass(cls):
++ if sys.version_info >= (3, 9):
++ return
+ import warnings
+ # ElementTree warns about getiterator() in recent Pythons
+ warnings.filterwarnings(
+diff --git a/src/lxml/tests/test_etree.py b/src/lxml/tests/test_etree.py
+index 3d8dee1c..56d38e75 100644
+--- a/src/lxml/tests/test_etree.py
++++ b/src/lxml/tests/test_etree.py
+@@ -674,6 +674,17 @@ class ETreeOnlyTestCase(HelperTestCase):
+ parse = self.etree.parse
+ self.assertRaises(TypeError, parse, 'notthere.xml', object())
+
++ def test_iterparse_getiterator(self):
++ iterparse = self.etree.iterparse
++ f = BytesIO('<a><b><d/></b><c/></a>')
++
++ counts = []
++ for event, elem in iterparse(f):
++ counts.append(len(list(elem.getiterator())))
++ self.assertEqual(
++ [1,2,1,4],
++ counts)
++
+ def test_iterparse_tree_comments(self):
+ # ET removes comments
+ iterparse = self.etree.iterparse
+@@ -3027,6 +3038,206 @@ class ETreeOnlyTestCase(HelperTestCase):
+ el = etree.HTML('<hha:page-description>aa</hha:page-description>').find('.//page-description')
+ self.assertEqual({'hha': None}, el.nsmap)
+
++ def test_getchildren(self):
++ Element = self.etree.Element
++ SubElement = self.etree.SubElement
++
++ a = Element('a')
++ b = SubElement(a, 'b')
++ c = SubElement(a, 'c')
++ d = SubElement(b, 'd')
++ e = SubElement(c, 'e')
++ self.assertXML(
++ _bytes('<a><b><d></d></b><c><e></e></c></a>'),
++ a)
++ self.assertEqual(
++ [b, c],
++ a.getchildren())
++ self.assertEqual(
++ [d],
++ b.getchildren())
++ self.assertEqual(
++ [],
++ d.getchildren())
++
++ def test_getiterator(self):
++ Element = self.etree.Element
++ SubElement = self.etree.SubElement
++
++ a = Element('a')
++ b = SubElement(a, 'b')
++ c = SubElement(a, 'c')
++ d = SubElement(b, 'd')
++ e = SubElement(c, 'e')
++
++ self.assertEqual(
++ [a, b, d, c, e],
++ list(a.getiterator()))
++ self.assertEqual(
++ [d],
++ list(d.getiterator()))
++
++ def test_getiterator_empty(self):
++ Element = self.etree.Element
++ SubElement = self.etree.SubElement
++
++ a = Element('a')
++ b = SubElement(a, 'b')
++ c = SubElement(a, 'c')
++ d = SubElement(b, 'd')
++ e = SubElement(c, 'e')
++
++ self.assertEqual(
++ [],
++ list(a.getiterator('none')))
++ self.assertEqual(
++ [],
++ list(e.getiterator('none')))
++ self.assertEqual(
++ [e],
++ list(e.getiterator()))
++
++ def test_getiterator_filter(self):
++ Element = self.etree.Element
++ SubElement = self.etree.SubElement
++
++ a = Element('a')
++ b = SubElement(a, 'b')
++ c = SubElement(a, 'c')
++ d = SubElement(b, 'd')
++ e = SubElement(c, 'e')
++
++ self.assertEqual(
++ [a],
++ list(a.getiterator('a')))
++ a2 = SubElement(e, 'a')
++ self.assertEqual(
++ [a, a2],
++ list(a.getiterator('a')))
++ self.assertEqual(
++ [a2],
++ list(c.getiterator('a')))
++
++ def test_getiterator_filter_all(self):
++ Element = self.etree.Element
++ SubElement = self.etree.SubElement
++
++ a = Element('a')
++ b = SubElement(a, 'b')
++ c = SubElement(a, 'c')
++ d = SubElement(b, 'd')
++ e = SubElement(c, 'e')
++
++ self.assertEqual(
++ [a, b, d, c, e],
++ list(a.getiterator('*')))
++
++ def test_getiterator_filter_comment(self):
++ Element = self.etree.Element
++ Comment = self.etree.Comment
++ SubElement = self.etree.SubElement
++
++ a = Element('a')
++ b = SubElement(a, 'b')
++ comment_b = Comment("TEST-b")
++ b.append(comment_b)
++
++ self.assertEqual(
++ [comment_b],
++ list(a.getiterator(Comment)))
++
++ comment_a = Comment("TEST-a")
++ a.append(comment_a)
++
++ self.assertEqual(
++ [comment_b, comment_a],
++ list(a.getiterator(Comment)))
++
++ self.assertEqual(
++ [comment_b],
++ list(b.getiterator(Comment)))
++
++ def test_getiterator_filter_pi(self):
++ Element = self.etree.Element
++ PI = self.etree.ProcessingInstruction
++ SubElement = self.etree.SubElement
++
++ a = Element('a')
++ b = SubElement(a, 'b')
++ pi_b = PI("TEST-b")
++ b.append(pi_b)
++
++ self.assertEqual(
++ [pi_b],
++ list(a.getiterator(PI)))
++
++ pi_a = PI("TEST-a")
++ a.append(pi_a)
++
++ self.assertEqual(
++ [pi_b, pi_a],
++ list(a.getiterator(PI)))
++
++ self.assertEqual(
++ [pi_b],
++ list(b.getiterator(PI)))
++
++ def test_getiterator_with_text(self):
++ Element = self.etree.Element
++ SubElement = self.etree.SubElement
++
++ a = Element('a')
++ a.text = 'a'
++ b = SubElement(a, 'b')
++ b.text = 'b'
++ b.tail = 'b1'
++ c = SubElement(a, 'c')
++ c.text = 'c'
++ c.tail = 'c1'
++ d = SubElement(b, 'd')
++ d.text = 'd'
++ d.tail = 'd1'
++ e = SubElement(c, 'e')
++ e.text = 'e'
++ e.tail = 'e1'
++
++ self.assertEqual(
++ [a, b, d, c, e],
++ list(a.getiterator()))
++ #self.assertEqual(
++ # [d],
++ # list(d.getiterator()))
++
++ def test_getiterator_filter_with_text(self):
++ Element = self.etree.Element
++ SubElement = self.etree.SubElement
++
++ a = Element('a')
++ a.text = 'a'
++ b = SubElement(a, 'b')
++ b.text = 'b'
++ b.tail = 'b1'
++ c = SubElement(a, 'c')
++ c.text = 'c'
++ c.tail = 'c1'
++ d = SubElement(b, 'd')
++ d.text = 'd'
++ d.tail = 'd1'
++ e = SubElement(c, 'e')
++ e.text = 'e'
++ e.tail = 'e1'
++
++ self.assertEqual(
++ [a],
++ list(a.getiterator('a')))
++ a2 = SubElement(e, 'a')
++ self.assertEqual(
++ [a, a2],
++ list(a.getiterator('a')))
++ self.assertEqual(
++ [a2],
++ list(e.getiterator('a')))
++
+ def test_getiterator_filter_multiple(self):
+ Element = self.etree.Element
+ SubElement = self.etree.SubElement
+@@ -3203,6 +3414,41 @@ class ETreeOnlyTestCase(HelperTestCase):
+ [a, b, c],
+ list(a.getiterator('*')))
+
++ def test_elementtree_getiterator(self):
++ Element = self.etree.Element
++ SubElement = self.etree.SubElement
++ ElementTree = self.etree.ElementTree
++
++ a = Element('a')
++ b = SubElement(a, 'b')
++ c = SubElement(a, 'c')
++ d = SubElement(b, 'd')
++ e = SubElement(c, 'e')
++ t = ElementTree(element=a)
++
++ self.assertEqual(
++ [a, b, d, c, e],
++ list(t.getiterator()))
++
++ def test_elementtree_getiterator_filter(self):
++ Element = self.etree.Element
++ SubElement = self.etree.SubElement
++ ElementTree = self.etree.ElementTree
++ a = Element('a')
++ b = SubElement(a, 'b')
++ c = SubElement(a, 'c')
++ d = SubElement(b, 'd')
++ e = SubElement(c, 'e')
++ t = ElementTree(element=a)
++
++ self.assertEqual(
++ [a],
++ list(t.getiterator('a')))
++ a2 = SubElement(e, 'a')
++ self.assertEqual(
++ [a, a2],
++ list(t.getiterator('a')))
++
+ def test_elementtree_getelementpath(self):
+ a = etree.Element("a")
+ b = etree.SubElement(a, "b")
+--
+2.26.2
+
+From 56ddb10e50eba7a6352e397f259d9497b44f658d Mon Sep 17 00:00:00 2001
+From: Stefan Behnel <stefan_ml@behnel.de>
+Date: Tue, 26 May 2020 11:30:45 +0200
+Subject: [PATCH 2/2] Fix a test after moving it to a different test module.
+
+---
+ src/lxml/tests/test_etree.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/lxml/tests/test_etree.py b/src/lxml/tests/test_etree.py
+index 56d38e75..105c59b8 100644
+--- a/src/lxml/tests/test_etree.py
++++ b/src/lxml/tests/test_etree.py
+@@ -3047,9 +3047,9 @@ class ETreeOnlyTestCase(HelperTestCase):
+ c = SubElement(a, 'c')
+ d = SubElement(b, 'd')
+ e = SubElement(c, 'e')
+- self.assertXML(
++ self.assertEqual(
+ _bytes('<a><b><d></d></b><c><e></e></c></a>'),
+- a)
++ self.etree.tostring(a, method="c14n"))
+ self.assertEqual(
+ [b, c],
+ a.getchildren())
+--
+2.26.2
+
diff --git a/dev-python/lxml/lxml-4.5.1.ebuild b/dev-python/lxml/lxml-4.5.1.ebuild
index 34a5acd3ff9..076c86886dd 100644
--- a/dev-python/lxml/lxml-4.5.1.ebuild
+++ b/dev-python/lxml/lxml-4.5.1.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python2_7 python3_{6,7,8} pypy3 )
+PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} pypy3 )
inherit distutils-r1 eutils toolchain-funcs
@@ -34,6 +34,7 @@ DISTUTILS_IN_SOURCE_BUILD=1
PATCHES=(
"${FILESDIR}"/${PN}-4.5.0-tests-pypy.patch
+ "${FILESDIR}"/lxml-4.5.1-py39.patch
)
python_prepare_all() {
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/, dev-python/lxml/files/
@ 2021-10-29 15:12 Sam James
0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2021-10-29 15:12 UTC (permalink / raw
To: gentoo-commits
commit: d13eae5e5e10ef534833303d8a84cda4b2d81340
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 29 15:06:31 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Oct 29 15:06:31 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d13eae5e
dev-python/lxml: fix tests with newer libxml2
Backport of upstream commit.
Closes: https://bugs.gentoo.org/791190
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../lxml/files/lxml-4.6.3-tests-libxml2.patch | 22 ++++++++++++++++++++++
dev-python/lxml/lxml-4.6.3-r1.ebuild | 1 +
2 files changed, 23 insertions(+)
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
new file mode 100644
index 00000000000..4c682add3a2
--- /dev/null
+++ b/dev-python/lxml/files/lxml-4.6.3-tests-libxml2.patch
@@ -0,0 +1,22 @@
+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
index e0ce5bad3a3..cf132e42747 100644
--- a/dev-python/lxml/lxml-4.6.3-r1.ebuild
+++ b/dev-python/lxml/lxml-4.6.3-r1.ebuild
@@ -41,6 +41,7 @@ DISTUTILS_IN_SOURCE_BUILD=1
PATCHES=(
"${FILESDIR}"/${PN}-4.6.0-tests-pypy.patch
+ "${FILESDIR}"/${P}-tests-libxml2.patch
)
python_check_deps() {
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/, dev-python/lxml/files/
@ 2021-12-13 8:35 Michał Górny
0 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2021-12-13 8:35 UTC (permalink / raw
To: gentoo-commits
commit: 4db9a643160158ce1543ff7ebe5615cfb5b0eb20
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 13 07:30:42 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Dec 13 08:34:49 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4db9a643
dev-python/lxml: Bump to 4.6.5
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 | 18 +++++
dev-python/lxml/lxml-4.6.5.ebuild | 97 +++++++++++++++++++++++
3 files changed, 116 insertions(+)
diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
index f2f9855e1d2d..5088db7d6c62 100644
--- a/dev-python/lxml/Manifest
+++ b/dev-python/lxml/Manifest
@@ -1 +1,2 @@
DIST lxml-4.6.4.tar.gz 953275 BLAKE2B 7dae0fe0c92c937d823429b32ae952e501e193835892d40746aa35e48586df4e497865f246362ef10430cc9187cd54f98078b7edcc0fd9f421ac9d15994e7b2a SHA512 4e62b7c9ceec47f490136e86e9875aae3f3dccd0ee5e504f8128c62cdb111e00e64ee35678028438b87d32253fdeb8e1184d4017b56e06dfbc93cd0e8736101f
+DIST lxml-4.6.5.tar.gz 954972 BLAKE2B 79ddbc1556a70724f8def9621ecaf9fef45cf3437ce4ca721d54aeeecb28a88a283e14c5a6390fbda1cee023f2040a007dc6b8de769aabf36cba88a8cfc16cb2 SHA512 6354c1ef0c2e371142107b4bc9085dbde27378d819f2773656e4a6c017c34d6ce1501df42b1ccd524d10ed75032f8a3c8233e38e6908f521dcef5ace091480fc
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
index bd17a8e06e14..51bcb8fe2e22 100644
--- a/dev-python/lxml/files/lxml-4.6.0-tests-pypy.patch
+++ b/dev-python/lxml/files/lxml-4.6.0-tests-pypy.patch
@@ -432,3 +432,21 @@ index cde23357..41f8d78b 100644
--
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/lxml-4.6.5.ebuild b/dev-python/lxml/lxml-4.6.5.ebuild
new file mode 100644
index 000000000000..5669cfb3cd0a
--- /dev/null
+++ b/dev-python/lxml/lxml-4.6.5.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..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
+)
+
+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() {
+ 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] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/, dev-python/lxml/files/
@ 2023-07-27 4:24 Sam James
0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2023-07-27 4:24 UTC (permalink / raw
To: gentoo-commits
commit: 07f48c319ee7a5ebedbe615682f702c6ac99bbc9
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 27 04:24:12 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jul 27 04:24:31 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07f48c31
dev-python/lxml: backport cython-3 fixes and test fixes for newer libxml2
Closes: https://bugs.gentoo.org/898682
Closes: https://bugs.gentoo.org/905643
Closes: https://bugs.gentoo.org/906088
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-python/lxml/Manifest | 1 +
.../files/lxml-4.9.3-tests-py3.11-cython3.patch | 10 ++
dev-python/lxml/lxml-4.9.3-r1.ebuild | 116 +++++++++++++++++++++
3 files changed, 127 insertions(+)
diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
index 5b7a6edd4e46..3a2715be6ff9 100644
--- a/dev-python/lxml/Manifest
+++ b/dev-python/lxml/Manifest
@@ -1,2 +1,3 @@
DIST lxml-4.9.2.gh.tar.gz 957365 BLAKE2B 201b3977da90386e413f1b89a4b7ee1e44d6bbea05e622e92feb1d67c637ce46ebf746f0648f034ed3bccd609233ccf7d8a7ee456f13b8d9ca8587ddf1ebd32a SHA512 816b2fe2eef2a97a0df66cbc39850c6dc3d6470e4033cc73edb40c80c0afbbe6c084d042d7c98b29497926e76f648caa42e1ebe5d83060af08af6972316077b0
+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
new file mode 100644
index 000000000000..1fb466ab810f
--- /dev/null
+++ b/dev-python/lxml/files/lxml-4.9.3-tests-py3.11-cython3.patch
@@ -0,0 +1,10 @@
+--- 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/lxml-4.9.3-r1.ebuild b/dev-python/lxml/lxml-4.9.3-r1.ebuild
new file mode 100644
index 000000000000..0ec56e19ad13
--- /dev/null
+++ b/dev-python/lxml/lxml-4.9.3-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
+ 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] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/, dev-python/lxml/files/
@ 2024-08-27 16:13 Michał Górny
0 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2024-08-27 16:13 UTC (permalink / raw
To: gentoo-commits
commit: 05e7f4e069e35839e971f46c004b529a6c7abedd
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 27 15:44:42 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Aug 27 16:13:43 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05e7f4e0
dev-python/lxml: Bump to 5.3.0
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/lxml/Manifest | 1 +
dev-python/lxml/files/lxml-5.3.0-pypy.patch | 177 ++++++++++++++++++++++++++++
dev-python/lxml/lxml-5.3.0.ebuild | 119 +++++++++++++++++++
3 files changed, 297 insertions(+)
diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
index 8e6b184f8dd6..a9206fd64600 100644
--- a/dev-python/lxml/Manifest
+++ b/dev-python/lxml/Manifest
@@ -1 +1,2 @@
DIST lxml-5.2.2.gh.tar.gz 950650 BLAKE2B d9e3bd96f386a808eca58ffa9a6b5a79e43102b7161fac9b97905de2bd22d21feaddb093e27463f597ef5378d754011c2999a38953e6288595b8dd171976688b SHA512 20b87a2d6e7ac82b6979d6fd18ecd5c224fec6eeee6b69d47a5bf2947ce53e6a517d1b86ab68836a5974f78ce86551ddc2317c1a7255932b418b98dc64d59376
+DIST lxml-5.3.0.gh.tar.gz 951199 BLAKE2B 8317179c524856593b323f665c288ddddd8af7e716e1ddf1222a857c8466cfc62a6c20b21744ca418f809a3c8492216c5c9c38cfa62f2e7d51daea7343b6810b SHA512 514477bf4c865541233d73f20de816b51d265dbd75c56a0d13779e14527c73e85ca890718d06c08728da228d410459016e9cb8abdad4d03b44a81a04a198fb54
diff --git a/dev-python/lxml/files/lxml-5.3.0-pypy.patch b/dev-python/lxml/files/lxml-5.3.0-pypy.patch
new file mode 100644
index 000000000000..c83c73c81934
--- /dev/null
+++ b/dev-python/lxml/files/lxml-5.3.0-pypy.patch
@@ -0,0 +1,177 @@
+From b6ba59657c8c7e169e8eeb763d85ca6136df3eea Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Fri, 29 Mar 2024 16:22:00 +0100
+Subject: [PATCH] skip tests that are broken on pypy
+
+---
+ src/lxml/tests/test_http_io.py | 3 ++-
+ src/lxml/tests/test_nsclasses.py | 3 ++-
+ src/lxml/tests/test_objectify.py | 37 ++++++++++++++++++++++++++++++--
+ 3 files changed, 39 insertions(+), 4 deletions(-)
+
+diff --git a/src/lxml/tests/test_http_io.py b/src/lxml/tests/test_http_io.py
+index 8385e393..0b259299 100644
+--- a/src/lxml/tests/test_http_io.py
++++ b/src/lxml/tests/test_http_io.py
+@@ -10,3 +10,3 @@ import gzip
+
+-from .common_imports import etree, HelperTestCase, BytesIO, _bytes
++from .common_imports import etree, HelperTestCase, BytesIO, _bytes, IS_PYPY
+ from .dummy_http_server import webserver, HTTPRequestCollector
+@@ -14,2 +14,3 @@ from .dummy_http_server import webserver, HTTPRequestCollector
+
++@unittest.skipIf(IS_PYPY, "broken on pypy")
+ class HttpIOTestCase(HelperTestCase):
+diff --git a/src/lxml/tests/test_nsclasses.py b/src/lxml/tests/test_nsclasses.py
+index 0c33f20c..08540001 100644
+--- a/src/lxml/tests/test_nsclasses.py
++++ b/src/lxml/tests/test_nsclasses.py
+@@ -8,3 +8,3 @@ import unittest
+
+-from .common_imports import etree, HelperTestCase, _bytes, make_doctest
++from .common_imports import etree, HelperTestCase, _bytes, make_doctest, IS_PYPY
+
+@@ -45,2 +45,3 @@ class ETreeNamespaceClassesTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_ns_classes(self):
+diff --git a/src/lxml/tests/test_objectify.py b/src/lxml/tests/test_objectify.py
+index 39fe0098..92c857f8 100644
+--- a/src/lxml/tests/test_objectify.py
++++ b/src/lxml/tests/test_objectify.py
+@@ -10,3 +10,4 @@ import unittest
+ from .common_imports import (
+- etree, HelperTestCase, fileInTestDir, doctest, make_doctest, _bytes, _str, BytesIO
++ etree, HelperTestCase, fileInTestDir, doctest, make_doctest, _bytes, _str, BytesIO,
++ IS_PYPY
+ )
+@@ -383,2 +384,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_setattr(self):
+@@ -818,2 +820,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_build_tree(self):
+@@ -847,2 +850,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_type_bool(self):
+@@ -884,2 +888,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_type_str(self):
+@@ -891,2 +896,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_type_str_intliteral(self):
+@@ -898,2 +904,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_type_str_floatliteral(self):
+@@ -905,2 +912,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_type_str_mul(self):
+@@ -917,2 +925,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_type_str_add(self):
+@@ -992,2 +1001,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_type_ustr(self):
+@@ -999,2 +1009,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_type_ustr_intliteral(self):
+@@ -1006,2 +1017,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_type_ustr_floatliteral(self):
+@@ -1013,2 +1025,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_type_ustr_mul(self):
+@@ -1025,2 +1038,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_type_ustr_add(self):
+@@ -1050,2 +1064,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_type_int(self):
+@@ -1066,2 +1081,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_type_float(self):
+@@ -1082,2 +1098,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_type_float_precision(self):
+@@ -1101,2 +1118,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_type_float_precision_consistency(self):
+@@ -1187,2 +1205,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_type_unregistered(self):
+@@ -1349,2 +1368,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_type_str_cmp(self):
+@@ -1376,2 +1396,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_type_int_cmp(self):
+@@ -1398,2 +1419,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_type_bool_cmp(self):
+@@ -2067,2 +2089,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_registered_type_stringify(self):
+@@ -2537,2 +2560,3 @@ class ObjectifyTestCase(HelperTestCase):
+ # type-looked-up as ObjectifiedElement (no annotations)
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_efactory_int(self):
+@@ -2542,2 +2566,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_efactory_float(self):
+@@ -2547,2 +2572,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_efactory_str(self):
+@@ -2552,2 +2578,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_efactory_unicode(self):
+@@ -2557,2 +2584,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_efactory_bool(self):
+@@ -2562,2 +2590,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_efactory_none(self):
+@@ -2567,2 +2596,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_efactory_value_concatenation(self):
+@@ -2577,2 +2607,3 @@ class ObjectifyTestCase(HelperTestCase):
+
++ @unittest.skipIf(IS_PYPY, "broken on pypy")
+ def test_efactory_nested(self):
+@@ -2745,3 +2776,5 @@ def test_suite():
+ suite.addTests(doctest.DocTestSuite(objectify))
+- suite.addTests([make_doctest('objectify.txt')])
++ if not IS_PYPY:
++ suite.addTests([make_doctest('objectify.txt')])
++ suite.addTests([make_doctest('../../../doc/objectify.txt')])
+ return suite
+--
+2.46.0
+
diff --git a/dev-python/lxml/lxml-5.3.0.ebuild b/dev-python/lxml/lxml-5.3.0.ebuild
new file mode 100644
index 000000000000..324b1faf7bfd
--- /dev/null
+++ b/dev-python/lxml/lxml-5.3.0.ebuild
@@ -0,0 +1,119 @@
+# 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.3.0-pypy.patch"
+)
+
+python_check_deps() {
+ use doc || return 0
+ python_has_version -b "dev-python/docutils[${PYTHON_USEDEP}]" &&
+ python_has_version -b "dev-python/pygments[${PYTHON_USEDEP}]" &&
+ python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" &&
+ python_has_version -b "dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]"
+}
+
+python_prepare_all() {
+ # don't use some random SDK on Darwin
+ sed -i -e '/_ldflags =/s/=.*isysroot.*darwin.*None/= None/' \
+ setupinfo.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile() {
+ local DISTUTILS_ARGS=(
+ # by default it adds -w to CFLAGS
+ --warnings
+ )
+ tc-export PKG_CONFIG
+ distutils-r1_python_compile
+}
+
+python_compile_all() {
+ 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
+ mkdir "${dir}"/../../doc || die
+ # this one needs to be copied, because upstream uses doc/../../../doc
+ cp -r "${S}"/doc "${dir}"/../../ || die
+ ln -s "${S}"/doc "${dir}"/../../../../ || die
+
+ "${EPYTHON}" test.py --no-src -vv --all-levels -p ||
+ die "Tests fail on ${EPYTHON}"
+}
+
+python_install_all() {
+ if use doc; then
+ local DOCS=( README.rst *.txt doc/*.txt )
+ local HTML_DOCS=( doc/html/. )
+ fi
+ if use examples; then
+ dodoc -r samples
+ fi
+
+ distutils-r1_python_install_all
+}
+
+pkg_postinst() {
+ optfeature "Support for BeautifulSoup as a parser backend" dev-python/beautifulsoup4
+ optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect
+ optfeature "Support for lxml.html.clean sanitizer" dev-python/lxml-html-clean
+}
^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-08-27 16:13 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-27 16:13 [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/, dev-python/lxml/files/ Michał Górny
-- strict thread matches above, loose matches on Subject: below --
2023-07-27 4:24 Sam James
2021-12-13 8:35 Michał Górny
2021-10-29 15:12 Sam James
2020-05-26 10:35 Michał Górny
2020-01-30 5:54 Michał Górny
2019-01-07 20:44 Virgil Dupras
2016-10-14 21:30 David Seifert
2015-11-13 13:20 Justin Lecher
2015-09-25 7:11 Justin Lecher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox