summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2012-06-26 03:13:34 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2012-06-26 03:13:34 +0000
commitbe2afd621e634c0e2105e52dddd47235587ed229 (patch)
treede5c348f2e462e8a1a44bad3e6bda45e46f14f7e /dev-python/mpmath
parentVersion bump (diff)
downloadgentoo-2-be2afd621e634c0e2105e52dddd47235587ed229.tar.gz
gentoo-2-be2afd621e634c0e2105e52dddd47235587ed229.tar.bz2
gentoo-2-be2afd621e634c0e2105e52dddd47235587ed229.zip
Fixed tests for python-3.2, thanks Arfrever. Some cleaning.
(Portage version: 2.1.11.1/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/mpmath')
-rw-r--r--dev-python/mpmath/ChangeLog7
-rw-r--r--dev-python/mpmath/files/mpmath-0.17-python-3.2.patch16
-rw-r--r--dev-python/mpmath/mpmath-0.17.ebuild10
3 files changed, 25 insertions, 8 deletions
diff --git a/dev-python/mpmath/ChangeLog b/dev-python/mpmath/ChangeLog
index 8432ea3fddc4..ee25ec5f8368 100644
--- a/dev-python/mpmath/ChangeLog
+++ b/dev-python/mpmath/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-python/mpmath
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/mpmath/ChangeLog,v 1.20 2012/06/20 21:05:06 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/mpmath/ChangeLog,v 1.21 2012/06/26 03:13:34 bicatali Exp $
+
+ 26 Jun 2012; Sébastien Fabbro <bicatali@gentoo.org>
+ +files/mpmath-0.17-python-3.2.patch, mpmath-0.17.ebuild:
+ Fixed tests for python-3.2, thanks Arfrever. Some cleaning.
20 Jun 2012; Justin Lecher <jlec@gentoo.org> mpmath-0.16.ebuild,
mpmath-0.17.ebuild, metadata.xml:
@@ -100,4 +104,3 @@
08 Jul 2008; Andrey Grozin <grozin@gentoo.org> +metadata.xml,
+mpmath-0.8.ebuild:
Initial import
-
diff --git a/dev-python/mpmath/files/mpmath-0.17-python-3.2.patch b/dev-python/mpmath/files/mpmath-0.17-python-3.2.patch
new file mode 100644
index 000000000000..00c74af9c7fe
--- /dev/null
+++ b/dev-python/mpmath/files/mpmath-0.17-python-3.2.patch
@@ -0,0 +1,16 @@
+http://code.google.com/p/mpmath/issues/detail?id=203
+http://code.google.com/p/mpmath/source/detail?r=1238
+
+--- mpmath/tests/test_basic_ops.py
++++ mpmath/tests/test_basic_ops.py
+@@ -148,8 +148,8 @@
+ assert hash(mp.mpq(5,1)) == hash(5)
+ assert hash(mp.mpq(1,2)) == hash(0.5)
+ if sys.version >= "3.2":
+- assert hash(mpf(1))*2**2000 == hash(2**2000)
+- assert hash(mpf(1))/2**2000 == hash(mpq(1,2**2000))
++ assert hash(mpf(1)*2**2000) == hash(2**2000)
++ assert hash(mpf(1)/2**2000) == hash(mpq(1,2**2000))
+
+ # Advanced rounding test
+ def test_add_rounding():
diff --git a/dev-python/mpmath/mpmath-0.17.ebuild b/dev-python/mpmath/mpmath-0.17.ebuild
index a62110fe3ef3..8ded3d403dd0 100644
--- a/dev-python/mpmath/mpmath-0.17.ebuild
+++ b/dev-python/mpmath/mpmath-0.17.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/mpmath/mpmath-0.17.ebuild,v 1.3 2012/06/20 21:05:06 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/mpmath/mpmath-0.17.ebuild,v 1.4 2012/06/26 03:13:34 bicatali Exp $
EAPI=4
@@ -37,6 +37,7 @@ src_prepare() {
# don't install tests
epatch "${FILESDIR}/${PN}.patch"
+ epatch "${FILESDIR}"/${P}-python-3.2.patch
# this fails with the current version of dev-python/py
rm -f ${PN}/conftest.py
@@ -67,9 +68,7 @@ src_test() {
src_install() {
distutils_src_install
- if use doc; then
- dohtml -r doc/build/* || die "Installation of documentation failed"
- fi
+ use doc && dohtml -r doc/build/*
if use examples; then
insinto /usr/share/doc/${PF}/examples
@@ -80,10 +79,9 @@ src_install() {
local path="${ED}$(python_get_sitedir)/${PN}/libmp/"
if [[ "${PYTHON_ABI}" == 2.* ]]; then
rm -f "${path}exec_py3.py"
- else if [[ "${PYTHON_ABI}" == 3.* ]]; then
+ elif [[ "${PYTHON_ABI}" == 3.* ]]; then
rm -f "${path}exec_py2.py"
fi
- fi
}
python_execute_function rm_unneeded