mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-python/lxml: Remove old
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -1,3 +1 @@
|
||||
DIST lxml-6.0.2.gh.tar.gz 990107 BLAKE2B c01a94fef56754599100b65927b40c2d786d631f02bbfe6cff3865a00531ab26fc6a0fe5cf9b02bdcf01beb45ef94fd4436ed4c06f5c8fd9e707bcae80c0f2f4 SHA512 164dc5e38e394f4396faf0b06729039f6807a227e1a2755a6991e6dce569cc64244d5edfd2cf2af0d4e845d7155a76f6e391e32f3d5aac21dff3c07cbbe06460
|
||||
DIST lxml-6.0.4.gh.tar.gz 992033 BLAKE2B fefffe0c0bdf79a2527c53ce54a079e01f40ce3fc6624ba13b199c88c49c6d4c2d9e59760f6a0646d3f2fa21d9e50a42d3319eb74ad91a044dd5f3d37385914c SHA512 8738d0912ee293f478da87affe07b9ca85542732023bab6ac32dfe97ced9695fcc1bf31e4ddc6d5a2d1d3f87be818344d9414b314e94853b0e82bc0fbe0e51f9
|
||||
DIST lxml-6.1.0.gh.tar.gz 992616 BLAKE2B bf0269bb5d757fb91e586b73436a2502b86ba23a4f09143d1af5131ba4d8fbec57cd5ce0804113a8d258c6312f17404b0d67992722f19b9544610bf26f7caf7b SHA512 c738958839f9fb627ede8c4758b849d60be5210617fb2f4d9d2072f9f724a54d63648964b8716b0e23eaba044d77d02e621579c7aaee53fa2e30bc206a4a8534
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
From 405dd576104cf0e92fbd40d5b294abd93ecb9d41 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 ++-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/lxml/tests/test_http_io.py b/src/lxml/tests/test_http_io.py
|
||||
index 12c9d606..d95e3e06 100644
|
||||
--- a/src/lxml/tests/test_http_io.py
|
||||
+++ b/src/lxml/tests/test_http_io.py
|
||||
@@ -8,7 +8,7 @@ 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
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ def needs_http(test_method, _skip_when_called=unittest.skip("needs HTTP support
|
||||
return _skip_when_called(test_method)
|
||||
|
||||
|
||||
+@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 0c33f20c..08540001 100644
|
||||
--- a/src/lxml/tests/test_nsclasses.py
|
||||
+++ b/src/lxml/tests/test_nsclasses.py
|
||||
@@ -6,7 +6,7 @@ namespace registry mechanism
|
||||
|
||||
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):
|
||||
|
||||
@@ -43,6 +43,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}
|
||||
@@ -1,120 +0,0 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_EXT=1
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{11..14} pypy3_11 )
|
||||
|
||||
inherit distutils-r1 optfeature toolchain-funcs
|
||||
|
||||
DESCRIPTION="A Pythonic binding for the libxml2 and libxslt libraries"
|
||||
HOMEPAGE="
|
||||
https://lxml.de/
|
||||
https://pypi.org/project/lxml/
|
||||
https://github.com/lxml/lxml/
|
||||
"
|
||||
SRC_URI="
|
||||
https://github.com/lxml/lxml/archive/${P}.tar.gz
|
||||
-> ${P}.gh.tar.gz
|
||||
"
|
||||
S=${WORKDIR}/lxml-${P}
|
||||
|
||||
LICENSE="BSD ElementTree GPL-2 PSF-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos ~x64-solaris"
|
||||
IUSE="doc examples +threads test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# Note: lib{xml2,xslt} are used as C libraries, not Python modules.
|
||||
DEPEND="
|
||||
>=dev-libs/libxml2-2.10.3:=
|
||||
>=dev-libs/libxslt-1.1.38
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
"
|
||||
BDEPEND="
|
||||
virtual/pkgconfig
|
||||
>=dev-python/cython-3.1.4[${PYTHON_USEDEP}]
|
||||
doc? (
|
||||
$(python_gen_any_dep '
|
||||
dev-python/docutils[${PYTHON_USEDEP}]
|
||||
dev-python/pygments[${PYTHON_USEDEP}]
|
||||
dev-python/sphinx[${PYTHON_USEDEP}]
|
||||
dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]
|
||||
')
|
||||
)
|
||||
test? (
|
||||
dev-python/cssselect[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-6.0.0-pypy.patch"
|
||||
)
|
||||
|
||||
python_check_deps() {
|
||||
use doc || return 0
|
||||
python_has_version -b "dev-python/docutils[${PYTHON_USEDEP}]" &&
|
||||
python_has_version -b "dev-python/pygments[${PYTHON_USEDEP}]" &&
|
||||
python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" &&
|
||||
python_has_version -b "dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]"
|
||||
}
|
||||
|
||||
python_prepare_all() {
|
||||
# don't use some random SDK on Darwin
|
||||
sed -i -e '/_ldflags =/s/=.*isysroot.*darwin.*None/= None/' \
|
||||
setupinfo.py || die
|
||||
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_compile() {
|
||||
local DISTUTILS_ARGS=(
|
||||
# by default it adds -w to CFLAGS
|
||||
--warnings
|
||||
)
|
||||
tc-export PKG_CONFIG
|
||||
distutils-r1_python_compile
|
||||
}
|
||||
|
||||
python_compile_all() {
|
||||
# disable automagic dep on coverage
|
||||
use doc && emake CYTHON_WITH_COVERAGE= html
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local dir=${BUILD_DIR}/test$(python_get_sitedir)/lxml
|
||||
local -x PATH=${BUILD_DIR}/test/usr/bin:${PATH}
|
||||
|
||||
cp -al "${BUILD_DIR}"/{install,test} || die
|
||||
cp -al src/lxml/tests "${dir}/" || die
|
||||
cp -al src/lxml/html/tests "${dir}/html/" || die
|
||||
mkdir "${dir}"/../../doc || die
|
||||
# this one needs to be copied, because upstream uses doc/../../../doc
|
||||
cp -r "${S}"/doc "${dir}"/../../ || die
|
||||
ln -s "${S}"/doc "${dir}"/../../../../ || die
|
||||
|
||||
"${EPYTHON}" test.py --no-src -vv --all-levels -p ||
|
||||
die "Tests fail on ${EPYTHON}"
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
if use doc; then
|
||||
local DOCS=( README.rst *.txt doc/*.txt )
|
||||
local HTML_DOCS=( doc/html/. )
|
||||
fi
|
||||
if use examples; then
|
||||
dodoc -r samples
|
||||
fi
|
||||
|
||||
distutils-r1_python_install_all
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
optfeature "Support for BeautifulSoup as a parser backend" dev-python/beautifulsoup4
|
||||
optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect
|
||||
optfeature "Support for lxml.html.clean sanitizer" dev-python/lxml-html-clean
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_EXT=1
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_{11..14} pypy3_11 )
|
||||
|
||||
inherit distutils-r1 optfeature toolchain-funcs
|
||||
|
||||
DESCRIPTION="A Pythonic binding for the libxml2 and libxslt libraries"
|
||||
HOMEPAGE="
|
||||
https://lxml.de/
|
||||
https://pypi.org/project/lxml/
|
||||
https://github.com/lxml/lxml/
|
||||
"
|
||||
SRC_URI="
|
||||
https://github.com/lxml/lxml/archive/${P}.tar.gz
|
||||
-> ${P}.gh.tar.gz
|
||||
"
|
||||
S=${WORKDIR}/lxml-${P}
|
||||
|
||||
LICENSE="BSD ElementTree GPL-2 PSF-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris"
|
||||
IUSE="doc examples +threads test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# Note: lib{xml2,xslt} are used as C libraries, not Python modules.
|
||||
DEPEND="
|
||||
>=dev-libs/libxml2-2.10.3:=
|
||||
>=dev-libs/libxslt-1.1.38
|
||||
"
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
"
|
||||
BDEPEND="
|
||||
virtual/pkgconfig
|
||||
>=dev-python/cython-3.1.4[${PYTHON_USEDEP}]
|
||||
doc? (
|
||||
$(python_gen_any_dep '
|
||||
dev-python/docutils[${PYTHON_USEDEP}]
|
||||
dev-python/pygments[${PYTHON_USEDEP}]
|
||||
dev-python/sphinx[${PYTHON_USEDEP}]
|
||||
dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]
|
||||
')
|
||||
)
|
||||
test? (
|
||||
dev-python/cssselect[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-6.0.4-pypy.patch"
|
||||
)
|
||||
|
||||
python_check_deps() {
|
||||
use doc || return 0
|
||||
python_has_version -b "dev-python/docutils[${PYTHON_USEDEP}]" &&
|
||||
python_has_version -b "dev-python/pygments[${PYTHON_USEDEP}]" &&
|
||||
python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" &&
|
||||
python_has_version -b "dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]"
|
||||
}
|
||||
|
||||
python_prepare_all() {
|
||||
# don't use some random SDK on Darwin
|
||||
sed -i -e '/_ldflags =/s/=.*isysroot.*darwin.*None/= None/' \
|
||||
setupinfo.py || die
|
||||
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
python_compile() {
|
||||
local DISTUTILS_ARGS=(
|
||||
# by default it adds -w to CFLAGS
|
||||
--warnings
|
||||
)
|
||||
tc-export PKG_CONFIG
|
||||
distutils-r1_python_compile
|
||||
}
|
||||
|
||||
python_compile_all() {
|
||||
# disable automagic dep on coverage
|
||||
use doc && emake CYTHON_WITH_COVERAGE= html
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local dir=${BUILD_DIR}/test$(python_get_sitedir)/lxml
|
||||
local -x PATH=${BUILD_DIR}/test/usr/bin:${PATH}
|
||||
|
||||
cp -al "${BUILD_DIR}"/{install,test} || die
|
||||
cp -al src/lxml/tests "${dir}/" || die
|
||||
cp -al src/lxml/html/tests "${dir}/html/" || die
|
||||
mkdir "${dir}"/../../doc || die
|
||||
# this one needs to be copied, because upstream uses doc/../../../doc
|
||||
cp -r "${S}"/doc "${dir}"/../../ || die
|
||||
ln -s "${S}"/doc "${dir}"/../../../../ || die
|
||||
|
||||
"${EPYTHON}" test.py --no-src -vv --all-levels -p ||
|
||||
die "Tests fail on ${EPYTHON}"
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
if use doc; then
|
||||
local DOCS=( README.rst *.txt doc/*.txt )
|
||||
local HTML_DOCS=( doc/html/. )
|
||||
fi
|
||||
if use examples; then
|
||||
dodoc -r samples
|
||||
fi
|
||||
|
||||
distutils-r1_python_install_all
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
optfeature "Support for BeautifulSoup as a parser backend" dev-python/beautifulsoup4
|
||||
optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect
|
||||
optfeature "Support for lxml.html.clean sanitizer" dev-python/lxml-html-clean
|
||||
}
|
||||
Reference in New Issue
Block a user