mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-25 07:31:01 +02:00
dev-python/lxml: Sync with Gentoo
It's from Gentoo commit 07f48c319ee7a5ebedbe615682f702c6ac99bbc9.
This commit is contained in:
parent
2f5d88215d
commit
7cd64c9c56
@ -1,2 +1,3 @@
|
|||||||
DIST lxml-4.9.2.gh.tar.gz 957365 BLAKE2B 201b3977da90386e413f1b89a4b7ee1e44d6bbea05e622e92feb1d67c637ce46ebf746f0648f034ed3bccd609233ccf7d8a7ee456f13b8d9ca8587ddf1ebd32a SHA512 816b2fe2eef2a97a0df66cbc39850c6dc3d6470e4033cc73edb40c80c0afbbe6c084d042d7c98b29497926e76f648caa42e1ebe5d83060af08af6972316077b0
|
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
|
DIST lxml-4.9.3.gh.tar.gz 958628 BLAKE2B ffdf3fe781a03815f7c026229d313721c93375ebafad9b4a20c5d8a380a631401e546d8701a94d8c49615fb6a71e84940d8ca0299b47a37c1c9596db36659113 SHA512 903bd4935c7708b459aee9befcf3f6e3e3aaa9adc122591ea923b6e3d8fd288f07cab3f5f0edb08e3bf9db80414324f0a1a8e5a5089f9cda82f6c50f5df59423
|
||||||
|
@ -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
|
116
sdk_container/src/third_party/portage-stable/dev-python/lxml/lxml-4.9.3-r1.ebuild
vendored
Normal file
116
sdk_container/src/third_party/portage-stable/dev-python/lxml/lxml-4.9.3-r1.ebuild
vendored
Normal file
@ -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
|
||||||
|
}
|
@ -23,7 +23,7 @@ S=${WORKDIR}/lxml-${P}
|
|||||||
|
|
||||||
LICENSE="BSD ElementTree GPL-2 PSF-2"
|
LICENSE="BSD ElementTree GPL-2 PSF-2"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
|
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"
|
IUSE="doc examples +threads test"
|
||||||
RESTRICT="!test? ( test )"
|
RESTRICT="!test? ( test )"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user