summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/mpmath')
-rw-r--r--dev-python/mpmath/Manifest2
-rw-r--r--dev-python/mpmath/files/mpmath.patch9
-rw-r--r--dev-python/mpmath/metadata.xml18
-rw-r--r--dev-python/mpmath/mpmath-0.18.ebuild63
-rw-r--r--dev-python/mpmath/mpmath-0.19.ebuild63
5 files changed, 155 insertions, 0 deletions
diff --git a/dev-python/mpmath/Manifest b/dev-python/mpmath/Manifest
new file mode 100644
index 000000000000..c09501166a75
--- /dev/null
+++ b/dev-python/mpmath/Manifest
@@ -0,0 +1,2 @@
+DIST mpmath-all-0.18.tar.gz 2122954 SHA256 47cc9587ea10202cdfb1afce4fb7410821e91ae6ecb1b54d62be1adfce80ee40 SHA512 a22e1c82f33a30584c975d196601e7bddaf33d4a41b1f288216a9df038ba5a45fd1002c5aa5f15084d05bee3abad944168ad131ac7e4feb218aac22789d8a63f WHIRLPOOL 7544b09310fbb262f2a4f487fa29af429196142e3fcab5822c1383420c7d8948a70b0f505adc0ce4fd7c0e6b6936b8dc6832a5e3d92e7c7cb71d05f6343dd79a
+DIST mpmath-all-0.19.tar.gz 2123129 SHA256 21a824db176799f42843e4510da4bc6db36ef92b5a43fff70fad7e29bffb9c86 SHA512 5a6ed0b5fad84c1e8399467ea7a1295f9b77c8e673b821c11e3298e88df6c48d9967eed84e2979bf12868e2f9b42bffba01a0c1836a6d82ac42d5f423fed6580 WHIRLPOOL 360fedc4d6942a138b33c63867f8a5e4ce4c101a8f7221c61503933e75073807676cbb240c9bddea765159cb134efd608256c9b921b7d282763b57d2897eefdb
diff --git a/dev-python/mpmath/files/mpmath.patch b/dev-python/mpmath/files/mpmath.patch
new file mode 100644
index 000000000000..3040216e56cc
--- /dev/null
+++ b/dev-python/mpmath/files/mpmath.patch
@@ -0,0 +1,9 @@
+diff -r -U1 mpmath-all-0.17.orig/setup.py mpmath-all-0.17/setup.py
+--- mpmath-all-0.17.orig/setup.py 2011-02-02 03:17:50.000000000 +0600
++++ mpmath-all-0.17/setup.py 2011-02-13 01:18:00.000000000 +0600
+@@ -15,4 +15,3 @@
+ 'mpmath/functions',
+- 'mpmath/matrices',
+- 'mpmath/tests'],
++ 'mpmath/matrices'],
+ classifiers=['Topic :: Scientific/Engineering :: Mathematics']
diff --git a/dev-python/mpmath/metadata.xml b/dev-python/mpmath/metadata.xml
new file mode 100644
index 000000000000..2d2c4a18f19f
--- /dev/null
+++ b/dev-python/mpmath/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci-mathematics</herd>
+<maintainer>
+ <email>grozin@gentoo.org</email>
+ <name>Andrey Grozin</name>
+</maintainer>
+<longdescription lang="en">
+ A Python library for arbitrary-precision floating-point arithmetic
+</longdescription>
+<use>
+ <flag name="matplotlib">Add support for <pkg>dev-python/matplotlib</pkg></flag>
+</use>
+<upstream>
+ <remote-id type="pypi">mpmath</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/dev-python/mpmath/mpmath-0.18.ebuild b/dev-python/mpmath/mpmath-0.18.ebuild
new file mode 100644
index 000000000000..921698ed1165
--- /dev/null
+++ b/dev-python/mpmath/mpmath-0.18.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3} )
+
+inherit distutils-r1 eutils
+
+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"
+SRC_URI="mirror://pypi/m/${PN}/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-linux ~x86-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"
+ )
+
+ # this fails with the current version of dev-python/py
+ rm ${PN}/conftest.py || die
+
+ # this test requires X
+ rm ${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
+}
+
+python_test() {
+ py.test -v || die
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( doc/build/. )
+ use examples && local EXAMPLES=( demo/. )
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/mpmath/mpmath-0.19.ebuild b/dev-python/mpmath/mpmath-0.19.ebuild
new file mode 100644
index 000000000000..6a8289e2d867
--- /dev/null
+++ b/dev-python/mpmath/mpmath-0.19.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit distutils-r1 eutils
+
+MY_PN=${PN}-all
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Python library for arbitrary-precision floating-point arithmetic"
+HOMEPAGE="http://mpmath.org/"
+SRC_URI="http://mpmath.org/files/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-linux ~x86-macos"
+
+IUSE="doc examples gmp matplotlib test"
+
+RDEPEND="
+ gmp? ( dev-python/gmpy )
+ matplotlib? ( dev-python/matplotlib[${PYTHON_USEDEP}] )"
+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"
+ )
+
+ # this fails with the current version of dev-python/py
+ rm ${PN}/conftest.py || die
+
+ # this test requires X
+ rm ${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
+}
+
+python_test() {
+ py.test -v || die
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( doc/build/. )
+ use examples && local EXAMPLES=( demo/. )
+ distutils-r1_python_install_all
+}