summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2014-02-02 17:14:59 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2014-02-02 17:14:59 +0000
commitd9a3f6e395f36263e92fe701501f4c5a16f272f7 (patch)
tree5d63aa6c71d4e4f081f785896e1870af0d767b8c /dev-python/mpmath
parentadd missing DEPEND to dev-util/intltool (bug #499886). Thanks Nikoli (diff)
downloadgentoo-2-d9a3f6e395f36263e92fe701501f4c5a16f272f7.tar.gz
gentoo-2-d9a3f6e395f36263e92fe701501f4c5a16f272f7.tar.bz2
gentoo-2-d9a3f6e395f36263e92fe701501f4c5a16f272f7.zip
re-add older versions
(Portage version: 2.2.8-prefix/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)
Diffstat (limited to 'dev-python/mpmath')
-rw-r--r--dev-python/mpmath/ChangeLog9
-rw-r--r--dev-python/mpmath/files/mpmath-0.17-gmpy2.patch19
-rw-r--r--dev-python/mpmath/files/mpmath-0.17-python-3.2.patch16
-rw-r--r--dev-python/mpmath/mpmath-0.17-r1.ebuild84
4 files changed, 127 insertions, 1 deletions
diff --git a/dev-python/mpmath/ChangeLog b/dev-python/mpmath/ChangeLog
index 8e8b89e55ab8..0ff6c45a1a32 100644
--- a/dev-python/mpmath/ChangeLog
+++ b/dev-python/mpmath/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-python/mpmath
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/mpmath/ChangeLog,v 1.30 2014/02/02 02:28:21 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/mpmath/ChangeLog,v 1.31 2014/02/02 17:14:59 bicatali Exp $
+
+*mpmath-0.17-r1 (02 Feb 2014)
+
+ 02 Feb 2014; Sébastien Fabbro <bicatali@gentoo.org>
+ +files/mpmath-0.17-gmpy2.patch, +files/mpmath-0.17-python-3.2.patch,
+ +mpmath-0.17-r1.ebuild:
+ re-add older versions
02 Feb 2014; Sébastien Fabbro <bicatali@gentoo.org>
-files/mpmath-0.17-gmpy2.patch, -files/mpmath-0.17-python-3.2.patch,
diff --git a/dev-python/mpmath/files/mpmath-0.17-gmpy2.patch b/dev-python/mpmath/files/mpmath-0.17-gmpy2.patch
new file mode 100644
index 000000000000..7e1093d60bd3
--- /dev/null
+++ b/dev-python/mpmath/files/mpmath-0.17-gmpy2.patch
@@ -0,0 +1,19 @@
+Index: mpmath/libmp/libintmath.py
+===================================================================
+--- mpmath/libmp/libintmath.py (revision 1234)
++++ mpmath/libmp/libintmath.py (revision 1235)
+@@ -298,8 +298,12 @@
+ sqrt_fixed2 = sqrt_fixed
+
+ if BACKEND == 'gmpy':
+- isqrt_small = isqrt_fast = isqrt = gmpy.sqrt
+- sqrtrem = gmpy.sqrtrem
++ if gmpy.version() >= '2':
++ isqrt_small = isqrt_fast = isqrt = gmpy.isqrt
++ sqrtrem = gmpy.isqrt_rem
++ else:
++ isqrt_small = isqrt_fast = isqrt = gmpy.sqrt
++ sqrtrem = gmpy.sqrtrem
+ elif BACKEND == 'sage':
+ isqrt_small = isqrt_fast = isqrt = \
+ getattr(sage_utils, "isqrt", lambda n: MPZ(n).isqrt())
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-r1.ebuild b/dev-python/mpmath/mpmath-0.17-r1.ebuild
new file mode 100644
index 000000000000..46b770eab094
--- /dev/null
+++ b/dev-python/mpmath/mpmath-0.17-r1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/mpmath/mpmath-0.17-r1.ebuild,v 1.5 2014/02/02 17:14:58 bicatali Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} )
+
+inherit distutils-r1 eutils # virtualx
+
+MY_PN=${PN}-all
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Python library for arbitrary-precision floating-point arithmetic"
+HOMEPAGE="http://code.google.com/p/mpmath/ http://pypi.python.org/pypi/mpmath/"
+SRC_URI="http://mpmath.googlecode.com/files/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~x86-linux ~ppc-macos"
+IUSE="doc examples gmp matplotlib test"
+
+RDEPEND="
+ gmp? ( dev-python/gmpy )
+ matplotlib? ( dev-python/matplotlib )"
+DEPEND="${RDEPEND}
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
+
+S="${WORKDIR}/${MY_P}"
+
+python_prepare_all() {
+ local PATCHES=(
+ "${FILESDIR}/${PN}.patch"
+ "${FILESDIR}/${P}-python-3.2.patch"
+ "${FILESDIR}/${P}-gmpy2.patch"
+ )
+
+ # this fails with the current version of dev-python/py
+ rm -f ${PN}/conftest.py || die
+
+ # this test requires X
+ rm -f ${PN}/tests/test_visualization.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ if use doc; then
+ einfo "Generation of documentation"
+ cd doc || die
+ "${PYTHON}" build.py || die "Generation of documentation failed"
+ fi
+}
+
+#src_test() {
+# local DISTUTILS_NO_PARALLEL_BUILD=true
+# VIRTUALX_COMMAND="distutils-r1_src_test"
+# virtualmake
+#}
+
+python_test() {
+ py.test -v || die
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( doc/build/. )
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins demo/*
+ fi
+ distutils-r1_python_install_all
+}
+
+python_install() {
+ distutils-r1_python_install
+ local path="${ED}$(python_get_sitedir)/${PN}/libmp/"
+ if [[ "${EPYTHON}" != python2* ]]; then
+ rm -f "${path}exec_py2.py" || ide
+ elif [[ "${EPYTHON}" != python3 ]]; then
+ rm -f "${path}exec_py3.py" || die
+ fi
+}