From 93a93e9a3b53c1a73142a305ea1f8136846942ee Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 22 Dec 2021 14:08:05 +0000 Subject: gentoo resync : 22.12.2021 --- dev-python/lxml/Manifest | 11 +-- dev-python/lxml/files/lxml-4.6.0-tests-pypy.patch | 18 ++++ .../lxml/files/lxml-4.6.3-tests-libxml2.patch | 22 ----- dev-python/lxml/lxml-4.6.3-r1.ebuild | 101 --------------------- dev-python/lxml/lxml-4.6.4.ebuild | 97 -------------------- dev-python/lxml/lxml-4.6.5.ebuild | 97 ++++++++++++++++++++ dev-python/lxml/lxml-4.7.1.ebuild | 97 ++++++++++++++++++++ 7 files changed, 217 insertions(+), 226 deletions(-) delete mode 100644 dev-python/lxml/files/lxml-4.6.3-tests-libxml2.patch delete mode 100644 dev-python/lxml/lxml-4.6.3-r1.ebuild delete mode 100644 dev-python/lxml/lxml-4.6.4.ebuild create mode 100644 dev-python/lxml/lxml-4.6.5.ebuild create mode 100644 dev-python/lxml/lxml-4.7.1.ebuild (limited to 'dev-python/lxml') diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest index 5c95294ed94e..9a1030430707 100644 --- a/dev-python/lxml/Manifest +++ b/dev-python/lxml/Manifest @@ -1,7 +1,6 @@ -AUX lxml-4.6.0-tests-pypy.patch 17417 BLAKE2B fb4c8452f1401c5d617ebbb3a944772c4da72d8261a99d3593c9886ec7c734d145f4919c61d5a4d434a3df942eb30183988965d28407fbfdae6f228c23dd5ab2 SHA512 527d330145491227319cfbf07d176f100b6d61b285a13f3e6fb0c3fb259df697de45ea22e2dd18db7d927cae32219992c542616c4c0120003b796a30974becb5 -AUX lxml-4.6.3-tests-libxml2.patch 847 BLAKE2B b16ac9e8c4c796db814b02cbe3476b443ea33796d64fe6ee3993d2ab04906dcea46923d7b23fb7cc9c534b8a6dd286eb0e9ab446e9eae18d90aa33f6df35273b SHA512 2b851c835ccbc1be07a823d928d63ceaa78df59133f14519e4fb6c71529341464c65cad05c3f8c500574a321c0340e5b6e51a267e368674329649ed765072d9f -DIST lxml-4.6.3.tar.gz 948931 BLAKE2B 373248827cb6bc0698b632ef60978adb2b8f7c37444fa1804567f08eb669018dc38fadf52422262fd96280e88c59578d244e4c5a1ed55609af55c010b3bf2b09 SHA512 50e42d6269dc45b4c0ab3285c49307f8bee87fcc4b9e0f531e1ee37bcf83c5938b7e361f906a3158fac8df89a79b932dd64a8839455e45f45f3a5f0ba73ff6a5 -DIST lxml-4.6.4.tar.gz 953275 BLAKE2B 7dae0fe0c92c937d823429b32ae952e501e193835892d40746aa35e48586df4e497865f246362ef10430cc9187cd54f98078b7edcc0fd9f421ac9d15994e7b2a SHA512 4e62b7c9ceec47f490136e86e9875aae3f3dccd0ee5e504f8128c62cdb111e00e64ee35678028438b87d32253fdeb8e1184d4017b56e06dfbc93cd0e8736101f -EBUILD lxml-4.6.3-r1.ebuild 2768 BLAKE2B 43b98b0121a32725ceda3a2da800a32315259db23ca2c1cc6229efbac4b8f9e635c5ad9f4478348f06861346c275201acaf093a78c287d0d8cc70cf69136ca4c SHA512 3e988f71250c111d7e8ac4c44ec0591094eb916cbbb925ad2d8d1537a515f2a5ced448e3e7789f562e4ca0211385acc47b0fc801d13497090adf31d67dcf6d6c -EBUILD lxml-4.6.4.ebuild 2651 BLAKE2B 9dc358eeb59595fc850c267abb6edeab9d85b68224ae56e82f58ea17a5665fb8bf57e9243bbf2e0914149b5b03b51d2ccaeb8ec1f1c27c95e03855a8a5c4d3ab SHA512 e409480ff66bb1173bd96b1148c3b4d50c3c88db689e3eac098e7159ac922e6d01c018e4dc437a7d73c9eafe9d8b96ad7660187905a8b60d8441ac428a93dfcc +AUX lxml-4.6.0-tests-pypy.patch 18051 BLAKE2B 99d97fa2e874c9bec4a866c3303b54ea2ab1e6abddf148d142cb66ee035b1eab1e05eed924d34451c5db38dc37f77104539cbfc2fe45815c17445b6359dcb857 SHA512 f6c6c2b00a49e6ca19d8b9123c364003a682c2e8df0c42d8600085d1cb094ba5cedd162bfc794e7d9acfff93aac771953dca5a879c3b957af1e2e8bd1db05515 +DIST lxml-4.6.5.tar.gz 954972 BLAKE2B 79ddbc1556a70724f8def9621ecaf9fef45cf3437ce4ca721d54aeeecb28a88a283e14c5a6390fbda1cee023f2040a007dc6b8de769aabf36cba88a8cfc16cb2 SHA512 6354c1ef0c2e371142107b4bc9085dbde27378d819f2773656e4a6c017c34d6ce1501df42b1ccd524d10ed75032f8a3c8233e38e6908f521dcef5ace091480fc +DIST lxml-4.7.1.tar.gz 958025 BLAKE2B d48a7aec9537235207fa387af7c49fe055ffa8e03bcea3e59807dfe35c72f1b1e01586aded550b53d5b7fac733baa1d47fbeea8fba937844de6dab10e02a3832 SHA512 33c88ff07152437a09268f3348ada97549686b5a59e2135631991ecc79ad02f35c20aae5d8363d2795bf058b05ef70fa6fbb56b081308cd89b073e176f4872d9 +EBUILD lxml-4.6.5.ebuild 2643 BLAKE2B 24e1a7f28900af55bdd714d3286e1d0c61e3e49a2ebcefce0cb7c0e654e0a063f19f38311441998b5570e4ddb72510dbd514e7057c437577752d85b2c4dedf41 SHA512 33328f6954ce149e7daed862dafe774915e5388e8c7e833fb7695b7512ce12167ca256ab876bce687e5387330c3b3b3e7918451db5aa678419321b8f44a8f2f3 +EBUILD lxml-4.7.1.ebuild 2651 BLAKE2B 9dc358eeb59595fc850c267abb6edeab9d85b68224ae56e82f58ea17a5665fb8bf57e9243bbf2e0914149b5b03b51d2ccaeb8ec1f1c27c95e03855a8a5c4d3ab SHA512 e409480ff66bb1173bd96b1148c3b4d50c3c88db689e3eac098e7159ac922e6d01c018e4dc437a7d73c9eafe9d8b96ad7660187905a8b60d8441ac428a93dfcc MISC metadata.xml 410 BLAKE2B 3e45012300d43f9a7169f47a5778a7e6eb87511166f8769bdeb3397672747924f64fbcb64ef532df6665acd139311fb265f050ae44e51eda53716aa126d28cf1 SHA512 c84744f005bfdc76280d50aca4903fe8c2584bb272dbb56c588722e55a765f5f8b232ed634a6553c82de959909e809773a9f1d992a5f7f54fe5b21ead1f2934d 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/files/lxml-4.6.3-tests-libxml2.patch b/dev-python/lxml/files/lxml-4.6.3-tests-libxml2.patch deleted file mode 100644 index 4c682add3a2d..000000000000 --- a/dev-python/lxml/files/lxml-4.6.3-tests-libxml2.patch +++ /dev/null @@ -1,22 +0,0 @@ -https://github.com/lxml/lxml/commit/852ed1092bd80b6b9a51db24371047ec88843031 -https://bugs.gentoo.org/791190 - -From: Stefan Behnel -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('aa').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 deleted file mode 100644 index cf132e427473..000000000000 --- a/dev-python/lxml/lxml-4.6.3-r1.ebuild +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{7..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 - "${FILESDIR}"/${P}-tests-libxml2.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/beautifulsoup4 - optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect -} diff --git a/dev-python/lxml/lxml-4.6.4.ebuild b/dev-python/lxml/lxml-4.6.4.ebuild deleted file mode 100644 index 5669cfb3cd0a..000000000000 --- a/dev-python/lxml/lxml-4.6.4.ebuild +++ /dev/null @@ -1,97 +0,0 @@ -# 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 -} 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..47c2e6f13d96 --- /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 +} diff --git a/dev-python/lxml/lxml-4.7.1.ebuild b/dev-python/lxml/lxml-4.7.1.ebuild new file mode 100644 index 000000000000..5669cfb3cd0a --- /dev/null +++ b/dev-python/lxml/lxml-4.7.1.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 +} -- cgit v1.2.3