public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "David Seifert" <soap@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, 14 Oct 2016 21:30:35 +0000 (UTC)	[thread overview]
Message-ID: <1476480563.7431927890255ab19e98f69ee6ed65962baf61cc.soap@gentoo> (raw)

commit:     7431927890255ab19e98f69ee6ed65962baf61cc
Author:     Mathy Vanvoorden <mathy <AT> vanvoorden <DOT> be>
AuthorDate: Tue Oct 11 21:30:09 2016 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Fri Oct 14 21:29:23 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74319278

dev-python/lxml: disable broken test-case, EAPI upgrade

There is a test-case not working because of issues in
libxml2. The patch disables the one broken test-case
until upstream can fix it.

Upstream bug: https://bugs.launchpad.net/lxml/+bug/1608479

Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=592860

Package-Manager: portage-2.3.0
Closes: https://github.com/gentoo/gentoo/pull/2539

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../lxml/files/lxml-3.6.4-fix-test_xmlschema.patch | 36 ++++++++++++++++++++++
 dev-python/lxml/lxml-3.6.4-r1.ebuild               | 23 ++++++++++----
 2 files changed, 53 insertions(+), 6 deletions(-)

diff --git a/dev-python/lxml/files/lxml-3.6.4-fix-test_xmlschema.patch b/dev-python/lxml/files/lxml-3.6.4-fix-test_xmlschema.patch
new file mode 100644
index 00000000..13f963a
--- /dev/null
+++ b/dev-python/lxml/files/lxml-3.6.4-fix-test_xmlschema.patch
@@ -0,0 +1,36 @@
+diff --git a/src/lxml/tests/test_xmlschema.py b/src/lxml/tests/test_xmlschema.py
+index 26d8432..b41c097 100644
+--- a/src/lxml/tests/test_xmlschema.py
++++ b/src/lxml/tests/test_xmlschema.py
+@@ -168,31 +168,6 @@ class ETreeXMLSchemaTestCase(HelperTestCase):
+         self.assertEqual('ho', root[2].get('hardy'))
+         self.assertEqual('hey', root[3].get('hardy'))
+ 
+-    def test_xmlschema_parse_fixed_attributes(self):
+-        # does not work as of libxml2 2.7.3
+-        schema = self.parse('''
+-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+-  <xsd:element name="a" type="AType"/>
+-  <xsd:complexType name="AType">
+-    <xsd:sequence minOccurs="3" maxOccurs="3">
+-      <xsd:element name="b" type="BType" />
+-    </xsd:sequence>
+-  </xsd:complexType>
+-  <xsd:complexType name="BType">
+-    <xsd:attribute name="hardy" type="xsd:string" fixed="hey" />
+-  </xsd:complexType>
+-</xsd:schema>
+-''')
+-        schema = etree.XMLSchema(schema)
+-        parser = etree.XMLParser(schema=schema, attribute_defaults=True)
+-
+-        tree_valid = self.parse('<a><b/><b hardy="hey"/><b/></a>',
+-                                parser=parser)
+-        root = tree_valid.getroot()
+-        self.assertEqual('hey', root[0].get('hardy'))
+-        self.assertEqual('hey', root[1].get('hardy'))
+-        self.assertEqual('hey', root[2].get('hardy'))
+-
+     def test_xmlschema_stringio(self):
+         schema_file = BytesIO('''
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

diff --git a/dev-python/lxml/lxml-3.6.4-r1.ebuild b/dev-python/lxml/lxml-3.6.4-r1.ebuild
index e7102f6..5e963ca 100644
--- a/dev-python/lxml/lxml-3.6.4-r1.ebuild
+++ b/dev-python/lxml/lxml-3.6.4-r1.ebuild
@@ -2,9 +2,9 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI=5
+EAPI=6
 
-PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
+PYTHON_COMPAT=( python2_7 python3_{4,5} )
 
 inherit distutils-r1 eutils flag-o-matic toolchain-funcs
 
@@ -28,7 +28,15 @@ DEPEND="${RDEPEND}
 
 DISTUTILS_IN_SOURCE_BUILD=1
 
-PATCHES=( "${FILESDIR}"/${PN}-3.5.0-cross-compile.patch )
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.5.0-cross-compile.patch
+
+	# This patch removes a testcase that fails because of issues
+	# in libxml2.
+	#
+	# Upstream bug: https://bugs.launchpad.net/lxml/+bug/1608479
+	"${FILESDIR}"/${PN}-3.6.4-fix-test_xmlschema.patch
+)
 
 python_prepare_all() {
 	# avoid replacing PYTHONPATH in tests.
@@ -39,7 +47,7 @@ python_prepare_all() {
 
 python_compile() {
 	if [[ ${EPYTHON} != python3* ]]; then
-		local CFLAGS=${CFLAGS}
+		local -x CFLAGS="${CFLAGS}"
 		append-cflags -fno-strict-aliasing
 	fi
 	tc-export PKG_CONFIG
@@ -51,7 +59,7 @@ python_test() {
 	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}"
+	"${EPYTHON}" test.py -vv --all-levels -p || die "Test ${test} fails with ${EPYTHON}"
 }
 
 python_install_all() {
@@ -59,7 +67,10 @@ python_install_all() {
 		local DOCS=( *.txt doc/*.txt )
 		local HTML_DOCS=( doc/html/. )
 	fi
-	use examples && local EXAMPLES=( samples/. )
+	if use examples; then
+		docinto examples
+		dodoc -r samples/.
+	fi
 
 	distutils-r1_python_install_all
 }


             reply	other threads:[~2016-10-14 21:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-14 21:30 David Seifert [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
2015-11-13 13:20 Justin Lecher
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=1476480563.7431927890255ab19e98f69ee6ed65962baf61cc.soap@gentoo \
    --to=soap@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