diff options
Diffstat (limited to 'dev-python/lxml')
-rw-r--r-- | dev-python/lxml/Manifest | 2 | ||||
-rw-r--r-- | dev-python/lxml/lxml-4.3.1.ebuild | 83 |
2 files changed, 85 insertions, 0 deletions
diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest index fb543505572e..8d0b66f464e0 100644 --- a/dev-python/lxml/Manifest +++ b/dev-python/lxml/Manifest @@ -1,6 +1,8 @@ AUX lxml-3.5.0-cross-compile.patch 1518 BLAKE2B 70907747332021789933759d3e2620d7b70a223664608680663472b648e2da103362bcbba6ee025375579cc2699432a44fc9b44169ba9c830ad546ebd3abd451 SHA512 b53925979e554552e72e58e06df579d2eb0190cadc304d13766852eaaeec78641deb1ef10700a0b52aebbdc998979830413a76a56cf221bce2e9a24926e1680b DIST lxml-4.2.5.tar.gz 4414081 BLAKE2B c1c75a0a0c33011e2becb729de2c15dd786dd12bddeba4f2f26032d0d17104f258b471f5f961cbf96340df66cbce3e874d7a16c59731af280a309132b669d1b9 SHA512 4cf336d3e1471e8a26492760a143881517d12eb1c2dad82f8786540471bfabd68f8c795d97b7362166418c2be3c7996816638fdbd5a594536b9981478b90fdfe DIST lxml-4.3.0.tar.gz 2483162 BLAKE2B 3f3646a47a0344af22bfb567a0985a27e8a46051850e99b5e82d0bc59c94c0e9b19ca93cf6d5d790599e81c9513686c3462ad6544ad658d0efd77ad431b07014 SHA512 49d122c8a6dafe50195bc8cfb3ea52780054a57762132c000cd976fdbdbabaab6bc8b95b77d124ae144f33c24d71793a2debbebf789d5ca866734a984edac8bb +DIST lxml-4.3.1.tar.gz 4380082 BLAKE2B 112b75dc05fa11e1506bd07f717bb7bf4ca73d587fb7f36ea49ce734251504c42ebb62c3b86bcf620e9a0fe5e03e6c47bd7c69024ce4aa3bb8af82b8d44ddd28 SHA512 ab82bb5af330cbb15da73184b7a24f55be9271751bd1dfdff26f75c5e0c92a771c5de0e935bc9675513d4c871fe199071137cdafac3ecd7da6a896ede02093b0 EBUILD lxml-4.2.5.ebuild 2350 BLAKE2B 9dae62d57ba95ad0ddc7358552fe2160fcfc70292b0a91d98d7b75fe4bd72b7638ce9febdf64bf504ff4709241f4054052792f05d90a969730ddc02739a8a811 SHA512 f8320c3324b14db07b442074734363744239b3f69e555b2d6a7cf6beb50349fda22992353923d5e142f04e00e6b5f257d1d9f84999fc5d1e6fe649414e2c6d7b EBUILD lxml-4.3.0.ebuild 2444 BLAKE2B 63e3cee7de3363d948a5bd34e50a0d90d771b94895e18a7249c66ed60b19ffa4703af30d0390bf21bd9f6af581db463d617e0477959f7c6a5115d6b2bc538062 SHA512 0c0fef86e16ec497f4a42f7aac2e53979ea5098131eee87912788f64716d118267baf8e29096df27096ae412c098128e2a9c629866c607f8d089ae9b207705bf +EBUILD lxml-4.3.1.ebuild 2444 BLAKE2B 63e3cee7de3363d948a5bd34e50a0d90d771b94895e18a7249c66ed60b19ffa4703af30d0390bf21bd9f6af581db463d617e0477959f7c6a5115d6b2bc538062 SHA512 0c0fef86e16ec497f4a42f7aac2e53979ea5098131eee87912788f64716d118267baf8e29096df27096ae412c098128e2a9c629866c607f8d089ae9b207705bf MISC metadata.xml 317 BLAKE2B ba93bbba5105423b6640b86b29f2a54ff50c9daf42424915cfe25049e983ca03c6f2fc066d4e27fe42292e8290b7091bc00d5a40f49d368a3dd6acce42c4504e SHA512 900609bfd7cd032821afb5d1f6e5c25287178f06a49e59431a710d4e76187a2b41a4a0da383d257777a2120b60f15620da37c70d145eca4a84aa30a08b824fae diff --git a/dev-python/lxml/lxml-4.3.1.ebuild b/dev-python/lxml/lxml-4.3.1.ebuild new file mode 100644 index 000000000000..38415295fbb3 --- /dev/null +++ b/dev-python/lxml/lxml-4.3.1.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} pypy ) + +inherit distutils-r1 eutils 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="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD ElementTree GPL-2 PSF-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="doc examples +threads 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 + $(python_gen_cond_dep 'dev-python/cython[${PYTHON_USEDEP}]' python2_7 'python3*') + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( dev-python/cssselect[${PYTHON_USEDEP}] ) + " + +DISTUTILS_IN_SOURCE_BUILD=1 + +PATCHES=( + "${FILESDIR}"/${PN}-3.5.0-cross-compile.patch +) + +python_prepare_all() { + # avoid replacing PYTHONPATH in tests. + sed -i -e '/sys\.path/d' test.py || die + + # apparently logs have changed with libxslt upgrade + # https://bugs.launchpad.net/lxml/+bug/1782078 + sed -i -e '/assertEqual(4, len(log)/d' src/lxml/tests/test_threading.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_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 +} |