diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-12-20 13:50:54 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-12-20 13:50:54 +0000 |
commit | aec6329fe6b56821fd643ccaacb4d5d61f4eaad6 (patch) | |
tree | 8c6e7db4b9a4a624121681a167e21bda8e3cfeec /dev-python/lxml | |
parent | 0c8ede87a5d0aa1ec25364a435296ec7aa8b9634 (diff) |
gentoo auto-resync : 20:12:2023 - 13:50:54
Diffstat (limited to 'dev-python/lxml')
-rw-r--r-- | dev-python/lxml/Manifest | 2 | ||||
-rw-r--r-- | dev-python/lxml/lxml-4.9.4.ebuild | 118 |
2 files changed, 120 insertions, 0 deletions
diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest index de9d7fdac42b..b9d7772549d3 100644 --- a/dev-python/lxml/Manifest +++ b/dev-python/lxml/Manifest @@ -1,4 +1,6 @@ DIST lxml-4.9.3-patches-2.tar.xz 24288 BLAKE2B 47b7c486a1c1616c875111bd53b14d4211a1eee3f412985f4022e71b85b087abd71d36919fb025257f17de404329284898ddc639f85e8b15ade21778fa218d98 SHA512 713172b4c907db6479a0a803a842824825b212a9b645c1ca356f793658bd6c63113ea248278e7c46b512e22e3130696e9fc5127fea82a67372d920733fc160b0 DIST lxml-4.9.3.gh.tar.gz 958628 BLAKE2B ffdf3fe781a03815f7c026229d313721c93375ebafad9b4a20c5d8a380a631401e546d8701a94d8c49615fb6a71e84940d8ca0299b47a37c1c9596db36659113 SHA512 903bd4935c7708b459aee9befcf3f6e3e3aaa9adc122591ea923b6e3d8fd288f07cab3f5f0edb08e3bf9db80414324f0a1a8e5a5089f9cda82f6c50f5df59423 +DIST lxml-4.9.4.gh.tar.gz 960009 BLAKE2B 7d31095dcf1f73c1026e7378e6adb19a053edc116b119ae415c3324134d3700822bf4611dc3cbf7c216d396e1404b143c8ebfdfb7e5a71b9ef6ec187898cc699 SHA512 528ef4ae057a7ee54d3193a042a6db500ada883d1d506829b6824d91ec979feb69ec79239420112eae0e08a437b2e5da8efc35feb5d04d119bfae2679e918d29 EBUILD lxml-4.9.3-r2.ebuild 2995 BLAKE2B f48ccbfdca26f9eb6e03a1823645e32c1815b653d9228c1b87036a16d01c89418765da5b0c0038f2e91eea1e1cc07f4018e8a1f901c79628437514b0d7d7ed6b SHA512 130dabb41404a1ad058c1efd9ff582e0c14441abe6a1733d716353a86167701041c9cc43554358a1ecdd83cba36019d618424421f1602772fe78ac80e6e45947 +EBUILD lxml-4.9.4.ebuild 3003 BLAKE2B cb85c578cf3e284b33987b9b85d7b6e5918a973adf20800fab4822e596b8a51ac56a93f9911fdde382f4857a799e1825cfed96f9c07edf0ad4a03718fa832819 SHA512 4a386eb0b886c0d0c53d2e3029c553034a745a05b0824b8e6fed555db707b4705f1d8ddf4548f1d1efe6f26cf10dfdbfd54aed2df7593c1b033ed98ac5238443 MISC metadata.xml 463 BLAKE2B 9bcd092b61568f5d467230617b101f36245c41078e6a66c7ff63b22a6b4095de2ba3a59e48ce8b7842ce58d1255fa293995652daa3fab4c3af988498eaa30e97 SHA512 2ba5e340b59e0de4e472380e9c19b1f6f573e86e5c3c2e075f6151d369e94eea70e3ce36bfb5ece4da3fa69459e3ff83368f1df8302aa5754ae52f13c8f2312e diff --git a/dev-python/lxml/lxml-4.9.4.ebuild b/dev-python/lxml/lxml-4.9.4.ebuild new file mode 100644 index 000000000000..2219b76e7dc6 --- /dev/null +++ b/dev-python/lxml/lxml-4.9.4.ebuild @@ -0,0 +1,118 @@ +# 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-2.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=( + "${WORKDIR}"/${PN}-4.9.3-patches-2 +) + +python_check_deps() { + use doc || return 0 + python_has_version -b "dev-python/docutils[${PYTHON_USEDEP}]" && + python_has_version -b "dev-python/pygments[${PYTHON_USEDEP}]" && + python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" && + python_has_version -b "dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]" +} + +python_prepare_all() { + # avoid replacing PYTHONPATH in tests. + sed -i -e '/sys\.path/d' test.py || die + + # don't use some random SDK on Darwin + sed -i -e '/_ldflags =/s/=.*isysroot.*darwin.*None/= None/' \ + setupinfo.py || die + + distutils-r1_python_prepare_all +} + +python_compile() { + local DISTUTILS_ARGS=( + # by default it adds -w to CFLAGS + --warnings + ) + tc-export PKG_CONFIG + distutils-r1_python_compile +} + +python_compile_all() { + use doc && emake html +} + +python_test() { + local dir=${BUILD_DIR}/test$(python_get_sitedir)/lxml + local -x PATH=${BUILD_DIR}/test/usr/bin:${PATH} + + cp -al "${BUILD_DIR}"/{install,test} || die + cp -al src/lxml/tests "${dir}/" || die + cp -al src/lxml/html/tests "${dir}/html/" || die + ln -rs "${S}"/doc "${dir}"/../../ || die + + "${EPYTHON}" test.py -vv --all-levels -p || die "Test ${test} fails with ${EPYTHON}" +} + +python_install_all() { + if use doc; then + local DOCS=( README.rst *.txt doc/*.txt ) + local HTML_DOCS=( doc/html/. ) + fi + if use examples; then + dodoc -r samples + fi + + distutils-r1_python_install_all +} + +pkg_postinst() { + optfeature "Support for BeautifulSoup as a parser backend" dev-python/beautifulsoup4 + optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect +} |