summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-12-22 23:58:12 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-12-22 23:58:12 +0000
commitfe667da559fe2a0a5a952f91426561a53acb0789 (patch)
tree0e8be7c019ff75db2e6d09a8426532ba86b35cc8 /dev-python/html5lib
parentPull in changes from overlay (diff)
downloadgentoo-2-fe667da559fe2a0a5a952f91426561a53acb0789.tar.gz
gentoo-2-fe667da559fe2a0a5a952f91426561a53acb0789.tar.bz2
gentoo-2-fe667da559fe2a0a5a952f91426561a53acb0789.zip
Fix tests with Python 2.6 (bug #298032). Set SUPPORT_PYTHON_ABIS.
(Portage version: 15132-svn/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/html5lib')
-rw-r--r--dev-python/html5lib/ChangeLog9
-rw-r--r--dev-python/html5lib/files/html5lib-0.11.1-python-2.6.patch19
-rw-r--r--dev-python/html5lib/html5lib-0.11.1-r1.ebuild (renamed from dev-python/html5lib/html5lib-0.11.1.ebuild)36
3 files changed, 48 insertions, 16 deletions
diff --git a/dev-python/html5lib/ChangeLog b/dev-python/html5lib/ChangeLog
index fb621daf3590..a764d9d644d1 100644
--- a/dev-python/html5lib/ChangeLog
+++ b/dev-python/html5lib/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-python/html5lib
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/html5lib/ChangeLog,v 1.2 2009/06/28 21:28:02 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/html5lib/ChangeLog,v 1.3 2009/12/22 23:58:12 arfrever Exp $
+
+*html5lib-0.11.1-r1 (23 Dec 2009)
+
+ 23 Dec 2009; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
+ -html5lib-0.11.1.ebuild, +html5lib-0.11.1-r1.ebuild,
+ +files/html5lib-0.11.1-python-2.6.patch:
+ Fix tests with Python 2.6 (bug #298032). Set SUPPORT_PYTHON_ABIS.
28 Jun 2009; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
html5lib-0.11.1.ebuild:
diff --git a/dev-python/html5lib/files/html5lib-0.11.1-python-2.6.patch b/dev-python/html5lib/files/html5lib-0.11.1-python-2.6.patch
new file mode 100644
index 000000000000..f3c2800e46e6
--- /dev/null
+++ b/dev-python/html5lib/files/html5lib-0.11.1-python-2.6.patch
@@ -0,0 +1,19 @@
+changeset: 1249:77f13a977be6
+user: jgraham@jgraham-desktop
+date: Wed Apr 29 17:17:24 2009 +0200
+summary: Fix deprecation warning
+
+--- src/html5lib/inputstream.py
++++ src/html5lib/inputstream.py
+@@ -444,8 +444,10 @@
+ """String-like object with an assosiated position and various extra methods
+ If the position is ever greater than the string length then an exception is
+ raised"""
++ def __new__(self, value):
++ return str.__new__(self, value)
++
+ def __init__(self, value):
+- str.__init__(self, value)
+ self._position=-1
+
+ def __iter__(self):
diff --git a/dev-python/html5lib/html5lib-0.11.1.ebuild b/dev-python/html5lib/html5lib-0.11.1-r1.ebuild
index 3e2b1a31f9b6..cbf3e971a1ec 100644
--- a/dev-python/html5lib/html5lib-0.11.1.ebuild
+++ b/dev-python/html5lib/html5lib-0.11.1-r1.ebuild
@@ -1,40 +1,46 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/html5lib/html5lib-0.11.1.ebuild,v 1.4 2009/06/28 21:28:02 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/html5lib/html5lib-0.11.1-r1.ebuild,v 1.1 2009/12/22 23:58:12 arfrever Exp $
EAPI="2"
+SUPPORT_PYTHON_ABIS="1"
-NEED_PYTHON="2.4"
-
-inherit distutils
+inherit distutils eutils
DESCRIPTION="HTML parser based on the WHAT-WG Web Applications 1.0 HTML5 specification"
HOMEPAGE="http://code.google.com/p/html5lib/"
SRC_URI="http://${PN}.googlecode.com/files/${P}.zip"
+
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="examples test"
-# simplejson will be bundled with Python 2.6
-RDEPEND="
- test? ( dev-python/simplejson )"
+RDEPEND="dev-lang/python[xml]"
DEPEND="${RDEPEND}
app-arch/unzip
>=dev-python/setuptools-0.6_rc5
- dev-lang/python[xml]"
+ test? ( dev-python/simplejson )"
+RESTRICT_PYTHON_ABIS="3.*"
+
+src_prepare() {
+ distutils_src_prepare
+ epatch "${FILESDIR}/${P}-python-2.6.patch"
+}
+
+src_test() {
+ testing() {
+ "$(PYTHON)" setup.py build -b "build-${PYTHON_ABI}" test
+ }
+ python_execute_function testing
+}
src_install() {
distutils_src_install
if use examples ; then
- $(find examples -name '*.pyc' -exec rm -rf {} ';')
+ find examples -name "*.pyc" | xargs rm -fr
insinto "/usr/share/doc/${PF}"
- doins -r examples || die "Failed to install examples"
+ doins -r examples || die "Installation of examples failed"
fi
}
-
-src_test() {
- distutils_python_version
- "${python}" setup.py test || die "tests failed"
-}