public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Justin Lecher" <jlec@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/, dev-python/lxml/files/
Date: Fri, 13 Nov 2015 13:20:51 +0000 (UTC)	[thread overview]
Message-ID: <1447420845.8cf0e35e447302c8ea0760b68b6f5479060d6149.jlec@gentoo> (raw)

commit:     8cf0e35e447302c8ea0760b68b6f5479060d6149
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 13 13:20:33 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Fri Nov 13 13:20:45 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8cf0e35e

dev-python/lxml: Version Bump

Package-Manager: portage-2.2.23
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 dev-python/lxml/Manifest                           |  1 +
 .../lxml/files/lxml-3.5.0-cross-compile.patch      | 39 ++++++++++++
 dev-python/lxml/lxml-3.5.0.ebuild                  | 70 ++++++++++++++++++++++
 3 files changed, 110 insertions(+)

diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
index b45bfee..2648d60 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 0000000..54e4087
--- /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 0000000..e3fb856
--- /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
+}


             reply	other threads:[~2015-11-13 13:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-13 13:20 Justin Lecher [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-27 16:13 [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/, dev-python/lxml/files/ Michał Górny
2023-07-27  4:24 Sam James
2021-12-13  8:35 Michał Górny
2021-10-29 15:12 Sam James
2020-05-26 10:35 Michał Górny
2020-01-30  5:54 Michał Górny
2019-01-07 20:44 Virgil Dupras
2016-10-14 21:30 David Seifert
2015-09-25  7:11 Justin Lecher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1447420845.8cf0e35e447302c8ea0760b68b6f5479060d6149.jlec@gentoo \
    --to=jlec@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox