summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2012-12-20 23:33:47 +0000
committerMichał Górny <mgorny@gentoo.org>2012-12-20 23:33:47 +0000
commit4f910959843274b2f82c1af724edacf25d0fe8b0 (patch)
tree7074fd3f66f4f331dc2da514d5f4f4eea0c0d968 /dev-python
parentstable arm ppc pp64, bug #447952, thanks peratu (diff)
downloadgentoo-2-4f910959843274b2f82c1af724edacf25d0fe8b0.tar.gz
gentoo-2-4f910959843274b2f82c1af724edacf25d0fe8b0.tar.bz2
gentoo-2-4f910959843274b2f82c1af724edacf25d0fe8b0.zip
Migrate to distutils-r1. Make tests actually fail.
(Portage version: 2.2.0_alpha149/cvs/Linux x86_64, signed Manifest commit with key 42B9401D)
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/decorator/ChangeLog8
-rw-r--r--dev-python/decorator/decorator-3.4.0-r1.ebuild33
-rw-r--r--dev-python/decorator/files/decorator-3.4.0-test-failure-exit.patch35
3 files changed, 75 insertions, 1 deletions
diff --git a/dev-python/decorator/ChangeLog b/dev-python/decorator/ChangeLog
index 06608e16c1ee..b787325388fd 100644
--- a/dev-python/decorator/ChangeLog
+++ b/dev-python/decorator/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-python/decorator
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/decorator/ChangeLog,v 1.57 2012/10/29 08:54:24 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/decorator/ChangeLog,v 1.58 2012/12/20 23:33:47 mgorny Exp $
+
+*decorator-3.4.0-r1 (20 Dec 2012)
+
+ 20 Dec 2012; Michał Górny <mgorny@gentoo.org> +decorator-3.4.0-r1.ebuild,
+ +files/decorator-3.4.0-test-failure-exit.patch:
+ Migrate to distutils-r1. Make tests actually fail.
*decorator-3.4.0 (29 Oct 2012)
diff --git a/dev-python/decorator/decorator-3.4.0-r1.ebuild b/dev-python/decorator/decorator-3.4.0-r1.ebuild
new file mode 100644
index 000000000000..e067571d4122
--- /dev/null
+++ b/dev-python/decorator/decorator-3.4.0-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/decorator/decorator-3.4.0-r1.ebuild,v 1.1 2012/12/20 23:33:47 mgorny Exp $
+
+EAPI=5
+PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} )
+
+inherit distutils-r1
+
+DESCRIPTION="Simplifies the usage of decorators for the average programmer"
+HOMEPAGE="http://pypi.python.org/pypi/decorator http://code.google.com/p/micheles/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+IUSE=""
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND=""
+
+DOCS=( README.txt )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-test-failure-exit.patch
+)
+
+python_test() {
+ local t=documentation.py
+ [[ ${EPYTHON} == python3* ]] && t=documentation3.py
+
+ "${PYTHON}" ${t} || die "Tests fail with ${EPYTHON}"
+}
diff --git a/dev-python/decorator/files/decorator-3.4.0-test-failure-exit.patch b/dev-python/decorator/files/decorator-3.4.0-test-failure-exit.patch
new file mode 100644
index 000000000000..4126e2bdced0
--- /dev/null
+++ b/dev-python/decorator/files/decorator-3.4.0-test-failure-exit.patch
@@ -0,0 +1,35 @@
+From fb1fc865000c92fc431a04d54116001c35ec0cdd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <gentoo@mgorny.alt.pl>
+Date: Fri, 21 Dec 2012 00:29:53 +0100
+Subject: [PATCH] Exit with failure when doctests fail.
+
+---
+ documentation.py | 3 ++-
+ documentation3.py | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/documentation.py b/documentation.py
+index 3d5a5c0..0ddd681 100644
+--- a/documentation.py
++++ b/documentation.py
+@@ -1131,4 +1131,5 @@ def hello(user):
+ print('hello %s' % user)
+
+ if __name__ == '__main__':
+- import doctest; doctest.testmod()
++ import doctest
++ sys.exit(0 if doctest.testmod()[0] == 0 else 1)
+diff --git a/documentation3.py b/documentation3.py
+index bd86cc6..4162d56 100644
+--- a/documentation3.py
++++ b/documentation3.py
+@@ -1167,4 +1167,5 @@ def hello(user):
+ print('hello %s' % user)
+
+ if __name__ == '__main__':
+- import doctest; doctest.testmod()
++ import doctest
++ sys.exit(0 if doctest.testmod()[0] == 0 else 1)
+--
+1.8.0.2
+