diff options
author | Justin Lecher <jlec@gentoo.org> | 2015-11-13 14:20:33 +0100 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2015-11-13 14:20:45 +0100 |
commit | 8cf0e35e447302c8ea0760b68b6f5479060d6149 (patch) | |
tree | 1360cf271c866fe794e2e6d5929b3b26cf402f70 /dev-python/lxml | |
parent | 72ec75696c791188f27f9653a8f6ffdd436fe60e (diff) | |
download | gentoo-8cf0e35e447302c8ea0760b68b6f5479060d6149.tar.gz gentoo-8cf0e35e447302c8ea0760b68b6f5479060d6149.tar.xz |
dev-python/lxml: Version Bump
Package-Manager: portage-2.2.23
Signed-off-by: Justin Lecher <jlec@gentoo.org>
Diffstat (limited to 'dev-python/lxml')
-rw-r--r-- | dev-python/lxml/Manifest | 1 | ||||
-rw-r--r-- | dev-python/lxml/files/lxml-3.5.0-cross-compile.patch | 39 | ||||
-rw-r--r-- | dev-python/lxml/lxml-3.5.0.ebuild | 70 |
3 files changed, 110 insertions, 0 deletions
diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest index b45bfeee81a..2648d60537d 100644 --- a/dev-python/lxml/Manifest +++ b/dev-python/lxml/Manifest @@ -1,2 +1,3 @@ DIST lxml-3.4.1.tar.gz 3524523 SHA256 069594837d0376a1bacf5cc42aa9a1be2e1c1396dc62f7d07f7358afecd34adf SHA512 ab669d1f9833e43b43ece4ef2481eebe22e9084ab07139f5c5c1fa6ea478177069d6ce96ece7eddef86982da418ec55a3785c4b78958f49f6ed415dc63af45ed WHIRLPOOL 5390f23aec3b7c07b9541f85ee5c674f267b99a9ef035cc5024d5f6defe6ee8ded500703b97b3f742f7630d25dbc538534654c8a3cddafb1ff37f5c5494bffb5 DIST lxml-3.4.4.tar.gz 3537508 SHA256 b3d362bac471172747cda3513238f115cbd6c5f8b8e6319bf6a97a7892724099 SHA512 94453ff0562fc18a4b43555271e2469556255b69daf5f801d1a0f1ff29fd73f4b46d4faba9bfe86b42cfdac31005a0d3cfcbf230e0c7593dd5fc6461afcad906 WHIRLPOOL 6debafb391c94bd57510498c8261a511759f52feb3065c8bdf3103b177b1ddcbad54968f1eceac07b97e42087a1c59a060a3719f9ea9d25a662da34bf314b89e +DIST lxml-3.5.0.tar.gz 3810202 SHA256 349f93e3a4b09cc59418854ab8013d027d246757c51744bf20069bc89016f578 SHA512 9b728642bec22be39aef603050121715521603a50bc01d3851e1eb7bfc6302c991da3a3bdebfdeaa9038e19fe39d8286f60851fecf1c4e85469f0ed8fa6e9368 WHIRLPOOL 50b9d3767377a5dee7359e4651bb91bc84539cbc18b552f07b9cf9b9f3f263c8cc3aae64adafb88a78776235a5f3780342d7b29cd369b77e8dc9ef8f8739a290 diff --git a/dev-python/lxml/files/lxml-3.5.0-cross-compile.patch b/dev-python/lxml/files/lxml-3.5.0-cross-compile.patch new file mode 100644 index 00000000000..54e4087a9b7 --- /dev/null +++ b/dev-python/lxml/files/lxml-3.5.0-cross-compile.patch @@ -0,0 +1,39 @@ + setupinfo.py | 18 +++--------------- + 1 file changed, 3 insertions(+), 15 deletions(-) + +diff --git a/setupinfo.py b/setupinfo.py +index e04c38f..0549eaa 100644 +--- a/setupinfo.py ++++ b/setupinfo.py +@@ -93,19 +93,6 @@ def ext_modules(static_include_dirs, static_library_dirs, + source_extension = ".c" + print("Building without Cython.") + +- lib_versions = get_library_versions() +- versions_ok = True +- if lib_versions[0]: +- print("Using build configuration of libxml2 %s and libxslt %s" % +- lib_versions) +- versions_ok = check_min_version(lib_versions[0], (2, 7, 0), 'libxml2') +- else: +- print("Using build configuration of libxslt %s" % +- lib_versions[1]) +- versions_ok |= check_min_version(lib_versions[1], (1, 1, 23), 'libxslt') +- if not versions_ok: +- raise RuntimeError("Dependency missing") +- + base_dir = get_base_dir() + _include_dirs = _prefer_reldirs( + base_dir, include_dirs(static_include_dirs) + [INCLUDE_PACKAGE_PATH]) +@@ -358,8 +345,9 @@ def get_library_versions(): + + + def flags(option): +- xml2_flags = run_command(find_xml2_config(), "--%s" % option) +- xslt_flags = run_command(find_xslt_config(), "--%s" % option) ++ pkg_config = os.environ.get('PKG_CONFIG', 'pkg-config') ++ xml2_flags = run_command(pkg_config, 'libxml-2.0', '--%s' % option) ++ xslt_flags = run_command(pkg_config, 'libxxlt', '--%s' % option) + + flag_list = xml2_flags.split() + for flag in xslt_flags.split(): diff --git a/dev-python/lxml/lxml-3.5.0.ebuild b/dev-python/lxml/lxml-3.5.0.ebuild new file mode 100644 index 00000000000..e3fb8567812 --- /dev/null +++ b/dev-python/lxml/lxml-3.5.0.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_{3,4,5} ) + +inherit distutils-r1 eutils flag-o-matic toolchain-funcs + +DESCRIPTION="A Pythonic binding for the libxml2 and libxslt libraries" +HOMEPAGE="http://lxml.de/ https://pypi.python.org/pypi/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 ~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.2 + >=dev-libs/libxslt-1.1.28" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( dev-python/cssselect[${PYTHON_USEDEP}] ) + " + +DISTUTILS_IN_SOURCE_BUILD=1 + +PATCHES=( "${FILESDIR}"/${P}-cross-compile.patch ) + +python_prepare_all() { + # avoid replacing PYTHONPATH in tests. + sed -i '/sys\.path/d' test.py || die + + distutils-r1_python_prepare_all +} + +python_compile() { + if [[ ${EPYTHON} != python3* ]]; then + local CFLAGS=${CFLAGS} + append-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 + + "${PYTHON}" test.py -vv --all-levels -p || die "Test ${test} fails with ${EPYTHON}" +} + +python_install_all() { + if use doc; then + local DOCS=( *.txt doc/*.txt ) + local HTML_DOCS=( doc/html/. ) + fi + use examples && local EXAMPLES=( samples/. ) + + distutils-r1_python_install_all +} + +pkg_postinst() { + optfeature "Support for BeautifulSoup3 as a parser backend" dev-python/beautifulsoup + optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect +} |