summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-11-20 22:22:49 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-11-20 22:22:49 +0000
commit7d33ee6764d246482385d53bd803d28135b86935 (patch)
treeaeab6e09777b32a5f3c33269c5f04f5ed2bddf10 /dev-python
parentVersion bump. (diff)
downloadhistorical-7d33ee6764d246482385d53bd803d28135b86935.tar.gz
historical-7d33ee6764d246482385d53bd803d28135b86935.tar.bz2
historical-7d33ee6764d246482385d53bd803d28135b86935.zip
Disable tests with Python 3. Fix SyntaxErrors with Python 3.
Package-Manager: portage-14854-svn/cvs/Linux x86_64
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/lxml/Manifest3
-rw-r--r--dev-python/lxml/files/lxml-2.2.4-python-3.patch44
-rw-r--r--dev-python/lxml/lxml-2.2.4.ebuild9
3 files changed, 53 insertions, 3 deletions
diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
index 1b9b251e9b4e..abefae808e70 100644
--- a/dev-python/lxml/Manifest
+++ b/dev-python/lxml/Manifest
@@ -1,9 +1,10 @@
AUX lxml-2.0.3-no-fake-pyrex.patch 442 RMD160 75164b0c95c96219be5bd5df529ee10a93b5545a SHA1 f98119743207a587bb1e3b5ccf8b93aa891c9516 SHA256 06d5e8be49eac6188e5ccb48c27b8307f5ddd3ab465d95f5c5adec756f3ee7ba
+AUX lxml-2.2.4-python-3.patch 1270 RMD160 16a79e8e05ee0f0f682340bde63d3e3c6cb8819b SHA1 f03dedccab36df33ba1d043f9378730240d7b00f SHA256 a254619109f84b06e188ea2b148ce3ebe5a9cc81da73eb746a85731ee91c882b
DIST lxml-2.2.2.tgz 2945079 RMD160 8cc42ceb7c631ba63763d6bb664d87ec3bcf84b0 SHA1 eec5fbcd513d24fc96e85ad7f7f16a6200067c6c SHA256 1b23f994da05cc99098228dfcf2a4c42fca20665d119b0204e46337e8cd7577e
DIST lxml-2.2.3.tgz 2961602 RMD160 140bc15ff762d4881d3bcd936aef682372deda76 SHA1 d910c141cb44d19100f442e12b31f57f59761c70 SHA256 3df975ffbf71825aceda5245b1696001dd319353d1dce28b9f3bc7458f2e6433
DIST lxml-2.2.4.tgz 2964382 RMD160 b7abdd8faee1ef1b2f1868fb188a2faea25a012e SHA1 da97ed375268363ad40501bcfc6980a6c5100d5e SHA256 5b21daabdfcd3c7b6498bf9074d5bd2217665d792e21ecc573d572f7eadc4ab7
EBUILD lxml-2.2.2.ebuild 2082 RMD160 1c572e4260136c1ba00419e54f7ea9fa8506d1bf SHA1 e4acea1ec864e8a6f56526fe7cf9f399b1228844 SHA256 5faf333cf4ca9bbb5ae8d62be5c3e2ff8e7d9e51d9d9ed9bdafcc105c1d28e26
EBUILD lxml-2.2.3.ebuild 2245 RMD160 6ab04023f0ed287b15972441fe0ef12b12b626c5 SHA1 80fa5a1b435a968ba46e2fee2a4f9b126f1868fd SHA256 6d80a08189c94480b0f390d738a6546a5853169e886e7f6c53a4d9400f232dc4
-EBUILD lxml-2.2.4.ebuild 2014 RMD160 484a136b6c091e0ecccf32c6c3f0bfc46069a48d SHA1 35421045021fa78507299609b87e6fe9502a6ab1 SHA256 806ae50cc2f94f0f0eeff1ee96c0684b91d2c4538f4f4c46f54715cf38ff831e
+EBUILD lxml-2.2.4.ebuild 2142 RMD160 a3083b0b31b90f74ef09d7bc401315d0288c3214 SHA1 d92b34fe6b654642efae93d845076062bdfed2f7 SHA256 a92d53aa428816a1fc83105ec5dd7c9c4bd0f97c478692547b47e35e300be167
MISC ChangeLog 8993 RMD160 8bf4d2c2b5cfdf7ea901d29561cc123b411973d9 SHA1 972e2c9ef349369724e0262183809e38558106e8 SHA256 b98ce2907bf85944729faffb05941c44ace4faa08eadaa212022fdc9081e7726
MISC metadata.xml 159 RMD160 900a8c55d7a7d2f6312594769aaf941bf9e99c7f SHA1 c8e604d56dae898258b5254d78cfeac0b981e288 SHA256 9f01104d3484792496faff4805eed0ecea2352a897151f3397d49a13800037b4
diff --git a/dev-python/lxml/files/lxml-2.2.4-python-3.patch b/dev-python/lxml/files/lxml-2.2.4-python-3.patch
new file mode 100644
index 000000000000..2b606a1c5613
--- /dev/null
+++ b/dev-python/lxml/files/lxml-2.2.4-python-3.patch
@@ -0,0 +1,44 @@
+This patch is probably incomplete.
+
+--- src/lxml/html/_diffcommand.py
++++ src/lxml/html/_diffcommand.py
+@@ -34,7 +34,7 @@
+ if options.annotation:
+ return annotate(options, args)
+ if len(args) != 2:
+- print 'Error: you must give two files'
++ print('Error: you must give two files')
+ parser.print_help()
+ sys.exit(1)
+ file1, file2 = args
+@@ -82,6 +82,6 @@
+ return pre, html, post
+
+ def annotate(options, args):
+- print "Not yet implemented"
++ print("Not yet implemented")
+ sys.exit(1)
+
+--- src/lxml/html/_html5builder.py
++++ src/lxml/html/_html5builder.py
+@@ -6,6 +6,7 @@
+
+ from html5lib.treebuilders import _base, etree as etree_builders
+ from lxml import html, etree
++from sys import hexversion
+
+
+ class DocumentType(object):
+@@ -77,7 +78,11 @@
+ self.doctype.systemId))
+ buf.append('>')
+ buf.append('<html></html>')
+- root = html.fromstring(u''.join(buf))
++ if hexversion >= 0x3000000:
++ joining_str = ''
++ else:
++ joining_str = ''.decode()
++ root = html.fromstring(joining_str.join(buf))
+
+ # Append the initial comments:
+ for comment in self.initialComments:
diff --git a/dev-python/lxml/lxml-2.2.4.ebuild b/dev-python/lxml/lxml-2.2.4.ebuild
index 0f62624b7f65..a4872c6b9ad4 100644
--- a/dev-python/lxml/lxml-2.2.4.ebuild
+++ b/dev-python/lxml/lxml-2.2.4.ebuild
@@ -1,11 +1,11 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/lxml/lxml-2.2.4.ebuild,v 1.1 2009/11/20 20:21:54 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/lxml/lxml-2.2.4.ebuild,v 1.2 2009/11/20 22:22:49 arfrever Exp $
EAPI="2"
SUPPORT_PYTHON_ABIS="1"
-inherit distutils flag-o-matic
+inherit distutils eutils flag-o-matic
DESCRIPTION="A Pythonic binding for the libxml2 and libxslt libraries"
HOMEPAGE="http://codespeak.net/lxml/ http://pypi.python.org/pypi/lxml"
@@ -33,6 +33,8 @@ src_prepare() {
# Disable broken tests.
sed -e "/elementsoup\.txt/d" -i src/lxml/html/tests/test_elementsoup.py || die "sed failed"
+
+ epatch "${FILESDIR}/${P}-python-3.patch"
}
src_compile() {
@@ -43,6 +45,9 @@ src_compile() {
src_test() {
testing() {
+ # Tests are broken with Python 3.
+ [[ "${PYTHON_ABI}" == 3.* ]] && return
+
local module
for module in lxml/etree lxml/objectify; do
ln -fs "../../$(ls -d build-${PYTHON_ABI}/lib.*)/${module}.so" "src/${module}.so" || die "ln -fs src/${module} failed"