summaryrefslogtreecommitdiff
path: root/dev-python/lxml
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-03-27 06:06:27 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-03-27 06:06:27 +0000
commit8d5dbd847cbc704a6a06405856e94b461011afe3 (patch)
tree4d26462d027b14926335894749d2e01d982234d0 /dev-python/lxml
parent5bb9ff1ee56d2b5e75e01a7f066d8b0cec84ec02 (diff)
gentoo resync : 27.03.2021
Diffstat (limited to 'dev-python/lxml')
-rw-r--r--dev-python/lxml/Manifest2
-rw-r--r--dev-python/lxml/lxml-4.6.3.ebuild101
2 files changed, 103 insertions, 0 deletions
diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
index 8939d054927f..a24439aad6c5 100644
--- a/dev-python/lxml/Manifest
+++ b/dev-python/lxml/Manifest
@@ -1,4 +1,6 @@
AUX lxml-4.6.0-tests-pypy.patch 17417 BLAKE2B fb4c8452f1401c5d617ebbb3a944772c4da72d8261a99d3593c9886ec7c734d145f4919c61d5a4d434a3df942eb30183988965d28407fbfdae6f228c23dd5ab2 SHA512 527d330145491227319cfbf07d176f100b6d61b285a13f3e6fb0c3fb259df697de45ea22e2dd18db7d927cae32219992c542616c4c0120003b796a30974becb5
DIST lxml-4.6.2.tar.gz 948652 BLAKE2B df6ec7e183df48c0edc6cce0fbdd6ab78eb8d1b7e8fb81a76bd9f4a24f05923c757d5b21f508be9be50c7bb187927c4e3a66146d480f2d40efc05388d26d3bf5 SHA512 81dcf5cade7b05c0e831beae7cdfbdb21e876fa55b23da98b89cbfa7960a4737efc13346ea3ade22a2448f20e036173cf5e32d43df6656c3231bfba07981f9ed
+DIST lxml-4.6.3.tar.gz 948931 BLAKE2B 373248827cb6bc0698b632ef60978adb2b8f7c37444fa1804567f08eb669018dc38fadf52422262fd96280e88c59578d244e4c5a1ed55609af55c010b3bf2b09 SHA512 50e42d6269dc45b4c0ab3285c49307f8bee87fcc4b9e0f531e1ee37bcf83c5938b7e361f906a3158fac8df89a79b932dd64a8839455e45f45f3a5f0ba73ff6a5
EBUILD lxml-4.6.2-r1.ebuild 2757 BLAKE2B da79450566fb16b051b49a62604059489f8b10279bfba42dbf148290bd48dde66c05e9131639e6418c581ac8169417de7baeea148ed6d49b72a80f197af2b8d8 SHA512 d20eef3858fb2bad303023308f0cd06b8f2aafb98782b587169b06912019a03ec05fe71a6d4f847de0a2390cefc7bca58b2da284d968ea74e1b7a64eda851001
+EBUILD lxml-4.6.3.ebuild 2757 BLAKE2B ffbaf919b80e3b511ee775a6e325b9a81f521966fade96817475d1324d0fb3190b7b5e0a9235a61f32821d7b666d64533871d2b977ce0d05a89a2927e3a6de9a SHA512 d29172e924f8340bbf808819d3d034f7afe6d05166bf21c88b463062e5738e656b4cace9c0ebe1b63c978e3f8afebd3ba1b316980e41634cf9bf2765649bab62
MISC metadata.xml 409 BLAKE2B 95add82278696324ff1c27f90f3bee49ed0b1ec46546751b5c9551991e1bb208139cb9e6594dc013ff14c032611f890da2330471bafa30960f8b61f45a1f0d4a SHA512 f4ab9197ba14428808081c0ff600b4b6d004690914ef6e8d053726a8d4d7dcf8df6ed2da56ce45a2aecc7484e9c5beced927771f1eb46dd7f6f61d5fd91b4f91
diff --git a/dev-python/lxml/lxml-4.6.3.ebuild b/dev-python/lxml/lxml-4.6.3.ebuild
new file mode 100644
index 000000000000..dd9739f01444
--- /dev/null
+++ b/dev-python/lxml/lxml-4.6.3.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} pypy3 )
+
+inherit distutils-r1 optfeature toolchain-funcs
+
+DESCRIPTION="A Pythonic binding for the libxml2 and libxslt libraries"
+HOMEPAGE="https://lxml.de/ https://pypi.org/project/lxml/ https://github.com/lxml/lxml"
+SRC_URI="https://github.com/lxml/lxml/archive/${P}.tar.gz"
+S=${WORKDIR}/lxml-${P}
+
+LICENSE="BSD ElementTree GPL-2 PSF-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~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}]
+ 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() {
+ if ! python_is_python3; then
+ local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
+ fi
+ tc-export PKG_CONFIG
+ distutils-r1_python_compile
+}
+
+python_compile_all() {
+ use doc && emake html
+}
+
+python_test() {
+ cp -r -l src/lxml/tests "${BUILD_DIR}"/lib/lxml/ || die
+ cp -r -l src/lxml/html/tests "${BUILD_DIR}"/lib/lxml/html/ || die
+ ln -s "${S}"/doc "${BUILD_DIR}"/ || die
+
+ "${EPYTHON}" test.py -vv --all-levels -p || die "Test ${test} fails with ${EPYTHON}"
+}
+
+python_install_all() {
+ if use doc; then
+ local DOCS=( README.rst *.txt doc/*.txt )
+ local HTML_DOCS=( doc/html/. )
+ fi
+ if use examples; then
+ dodoc -r samples
+ fi
+
+ distutils-r1_python_install_all
+}
+
+pkg_postinst() {
+ optfeature "Support for BeautifulSoup as a parser backend" dev-python/beautifulsoup
+ optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect
+}