summaryrefslogtreecommitdiff
path: root/dev-python/scientificpython
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-python/scientificpython
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/scientificpython')
-rw-r--r--dev-python/scientificpython/Manifest7
-rw-r--r--dev-python/scientificpython/files/scientificpython-2.9-mpi.patch40
-rw-r--r--dev-python/scientificpython/files/scientificpython-2.9.3-mpi-netcdf.patch43
-rw-r--r--dev-python/scientificpython/metadata.xml22
-rw-r--r--dev-python/scientificpython/scientificpython-2.9.4.ebuild69
5 files changed, 181 insertions, 0 deletions
diff --git a/dev-python/scientificpython/Manifest b/dev-python/scientificpython/Manifest
new file mode 100644
index 000000000000..3c4d4e6d55ea
--- /dev/null
+++ b/dev-python/scientificpython/Manifest
@@ -0,0 +1,7 @@
+AUX scientificpython-2.9-mpi.patch 1176 SHA256 de665a5fbf474253a1fff8b5a929cd68165e5d6dd0d9e0fe52b4ecd39bedc43f SHA512 1a71e79ae1ded669dc8a0796000e663fd19dd805c8756ec2731774a611d39d23a335cfd295b79922ddc6e66a423442147d075bf520a07017bb0735e655327455 WHIRLPOOL 23be6c232903e9121f378aa0b97e5fffa44456108e1648f14d8a6a74fdd21529a53ff1145780542db67351fc1d4fc5e061b5f7a9b514bee740499437afc69fbd
+AUX scientificpython-2.9.3-mpi-netcdf.patch 1736 SHA256 dcac1a1504a452eab13925ef843044ca2b1304d3ab1bef05cfd6984f07afe3dd SHA512 3136066d0a6b8ea489206ed80b024884f85bf2c6920ed758e94425cea7e75631a6907669b7e35a5f6200359c35cf36ac23a57e426e7e52f64513386d876636c2 WHIRLPOOL bb651432e3033493284a80b19e82ea4f94c87e2e1043ff7e838dd681c23d06f283077b81c8ac5383714dd1d8dba74c27ad65138b5e691d58da5ef22864065b0e
+DIST ScientificPython-2.9.4.tar.gz 688704 SHA256 c397fedf76500dc4c010785a82204a45ee51a04a54fabfb6142d594de14f8639 SHA512 8bd3ce3ead090832582711c25f7d4c7a5a55642ef9a1e845fb68b4b3dba833ba86baf9c444fd9948ce761a5357dbf388a2c1a860a66ee13fdf1f26d1010cc8c8 WHIRLPOOL 7890b534cffa53f258a5db8aa974805055773dc9be5ee9862e9c66f7c07df52e2abb36cc30a07e9bb9c8ee61183f44336643191f41e757ce31fa63773b0df8de
+EBUILD scientificpython-2.9.4.ebuild 1523 SHA256 3cd58926a5ff5323a3c4829f72b5228a242a299bfc011b92f8638ad56fde8f2e SHA512 00b30a0cb1bbbe302391d01f889007f36056f2b5313569d4ab21dcfd82376711a35d48916ab80a5ecd65ebe38a578f86d9ffba3b28636bde8fb1d536290f06e2 WHIRLPOOL e762d94ce7eaa7d4f6a728b7ae1f017dd17a03ede405b52f3e7d72a1c2329b2dcbf7078c73f34f61805285c104ccaf18f40eb428ea9bf5b01a334f569be0e45a
+MISC ChangeLog 3161 SHA256 2f93ab9ef14b34500ad2f3422686f40dd724011046206975b216db33ed0dd379 SHA512 7aa2ee7341c84a4fd91a9755c43d015b5d5b34d388ea3f53c6b0b92a6c37efd3a041f20f7e2a9d0551db00704ba7ec08c021c2cc1ecddf823652114f3ec22d71 WHIRLPOOL cbb7ba41c36166cab81c388968907d9283d532fd0d4eae43b4dcc1b3a8cd2fdf6112d29645f3925c02a74a7d693ddab23072c0ff37306f2efb402fb94a285e37
+MISC ChangeLog-2015 9302 SHA256 068e344e5429b2cd9aa2baa615c01fb1459fc6d0621a2531aa15c39400557595 SHA512 b47b47026e5d0e590a4aca76aa82b22ab985ffc244be90baccafe4fbc3e4e3a4267ebbab12f40b82d80dddeda4acd62404153dd7c25f71d6226a5601a0897ab2 WHIRLPOOL 1743b8a5c85feb436a0357d00b40e7ff5a19fac9eb2af96f604e327e5c8b6c4cb2e5c77f7b0b2508e8281c96c8f07eaa3e24f42d4437bd3d7b51590762079dc8
+MISC metadata.xml 926 SHA256 527e0ae2143f6567bcfcde41411100a8bc4c49c691bddd951c4b96b8894cf41c SHA512 f721101cc77917496eb449d6c0bd2fbe39ce1d20342db75a40b8ef4f59cb9e065bdf0f12d6d0773ba46ec0f946e5c184155d2ee0ca01974aee5bd2c96078d572 WHIRLPOOL 0afbfc5f1c0b58201d4919fc88e36a5495bd51abcc6ae547062695398b45451492852515321af7b46617dc0b3288ecbed6988a17327071bea5f7510c804af01d
diff --git a/dev-python/scientificpython/files/scientificpython-2.9-mpi.patch b/dev-python/scientificpython/files/scientificpython-2.9-mpi.patch
new file mode 100644
index 000000000000..3140779c74a9
--- /dev/null
+++ b/dev-python/scientificpython/files/scientificpython-2.9-mpi.patch
@@ -0,0 +1,40 @@
+--- Src/MPI/compile.py
++++ Src/MPI/compile.py
+@@ -4,7 +4,7 @@
+ # Normally nothing needs to be changed below
+ import distutils
+ import distutils.sysconfig
+-import os, sys
++import os, subprocess, sys
+ from Scientific import N
+
+ cfgDict = distutils.sysconfig.get_config_vars()
+@@ -32,16 +32,16 @@
+ items[i] = os.path.join(frameworkdir[0], items[i])
+ linkforshared = ' '.join(items)
+
+-cmd = '%s %s -o mpipython -I%s %s %s -L%s -lpython%s %s %s' % \
+- (mpicompiler,
+- linkforshared,
+- cfgDict['INCLUDEPY'],
+- extra_compile_args,
+- sources,
+- cfgDict['LIBPL'],
+- cfgDict['VERSION'],
+- cfgDict['LIBS'],
+- cfgDict['LIBM'])
++cmd = [mpicompiler]
++cmd.extend(linkforshared.split())
++cmd.extend(os.environ.get("CFLAGS", "").split())
++cmd.extend(os.environ.get("LDFLAGS", "").split())
++cmd.extend(["-o", "mpipython"])
++cmd.extend(["-I" + x for x in cfgDict['INCLUDEPY'].split()])
++cmd.extend(["-I../../Include"])
++cmd.extend(extra_compile_args.split())
++cmd.extend(sources.split())
++cmd.extend(["-lpython%s" % cfgDict['VERSION']])
+
+-print 'cmd = ', cmd
+-os.system(cmd)
++print 'cmd =', " ".join(cmd)
++sys.exit(subprocess.call(cmd))
diff --git a/dev-python/scientificpython/files/scientificpython-2.9.3-mpi-netcdf.patch b/dev-python/scientificpython/files/scientificpython-2.9.3-mpi-netcdf.patch
new file mode 100644
index 000000000000..c9672948f2f8
--- /dev/null
+++ b/dev-python/scientificpython/files/scientificpython-2.9.3-mpi-netcdf.patch
@@ -0,0 +1,43 @@
+From 71a5e881290c1cec2506a346e2740a1b821c36aa Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Thu, 13 Mar 2014 15:29:33 +0100
+Subject: [PATCH] Include MPI cflags/ldflags for netcdf.
+
+---
+ setup.py | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 7f01656..71ac92a 100644
+--- a/setup.py
++++ b/setup.py
+@@ -2,7 +2,7 @@
+
+ from distutils.core import setup, Extension
+ from distutils.command.install_headers import install_headers
+-import os, sys, platform
++import os, sys, platform, subprocess
+ from glob import glob
+
+ class Dummy:
+@@ -92,13 +92,16 @@ else:
+ netcdf_include = os.path.join(netcdf_prefix, 'include')
+ netcdf_h_file = os.path.join(netcdf_prefix, 'include', 'netcdf.h')
+ netcdf_lib = os.path.join(netcdf_prefix, 'lib')
++ mpi_cflags = subprocess.Popen(["mpicc", "-showme:compile"], stdout=subprocess.PIPE).communicate()[0].rstrip().split()
++ mpi_ldflags = subprocess.Popen(["mpicc", "-showme:link"], stdout=subprocess.PIPE).communicate()[0].rstrip().split()
+ ext_modules = [Extension('Scientific._netcdf',
+ ['Scientific/_netcdf.c'],
+ include_dirs=['Include', netcdf_include]
+ + numpy_include,
+ library_dirs=[netcdf_lib],
+ libraries = ['netcdf'],
+- extra_compile_args=extra_compile_args)]
++ extra_compile_args=extra_compile_args + mpi_cflags,
++ extra_link_args=mpi_ldflags)]
+
+ try:
+ # Add code for including documentation in Mac packages
+--
+1.9.0
+
diff --git a/dev-python/scientificpython/metadata.xml b/dev-python/scientificpython/metadata.xml
new file mode 100644
index 000000000000..ead81e593755
--- /dev/null
+++ b/dev-python/scientificpython/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <longdescription lang="en">
+ ScientificPython is a collection of Python modules that are useful for
+ scientific computing. In this collection you will find modules that
+ cover basic geometry (vectors, tensors, transformations, vector and
+ tensor fields), quaternions, automatic derivatives, linear
+ interpolation, polynomials, elementary statistics, nonlinear
+ least-squares fits, unit calculations, Fortran-compatible text
+ formatting, 3D visualization via VRML, and two Tk widgets for simple
+ line plots and 3D wireframe models.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-python/scientificpython/scientificpython-2.9.4.ebuild b/dev-python/scientificpython/scientificpython-2.9.4.ebuild
new file mode 100644
index 000000000000..a760b97ee758
--- /dev/null
+++ b/dev-python/scientificpython/scientificpython-2.9.4.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+MY_PN="ScientificPython"
+MY_P="${MY_PN}-${PV}"
+DOWNLOAD_NUMBER=4570
+
+DESCRIPTION="Scientific Module for Python"
+SRC_URI="http://sourcesup.cru.fr/frs/download.php/${DOWNLOAD_NUMBER}/${MY_P}.tar.gz"
+HOMEPAGE="http://sourcesup.cru.fr/projects/scientific-py/"
+
+LICENSE="CeCILL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc mpi test"
+
+RDEPEND="
+ <dev-python/numpy-1.9[${PYTHON_USEDEP}]
+ dev-python/pyro:3[${PYTHON_USEDEP}]
+ sci-libs/netcdf
+ mpi? ( virtual/mpi )"
+DEPEND="${RDEPEND}
+ test? ( dev-python/nose[${PYTHON_USEDEP}] )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.9-mpi.patch )
+DOCS=( README README.MPI Doc/CHANGELOG Examples/demomodule.c Examples/netcdf_demo.py )
+
+python_prepare_all() {
+ use mpi && PATCHES+=( "${FILESDIR}"/${PN}-2.9.3-mpi-netcdf.patch )
+ distutils-r1_python_prepare_all
+}
+
+python_compile() {
+ distutils-r1_python_compile
+
+ if use mpi; then
+ cd Src/MPI || die
+ ${PYTHON} compile.py || die
+ mv -f mpipython mpipython-${EPYTHON} || die
+ fi
+}
+
+python_test() {
+ cd "${S}"/Tests || die
+ nosetests -v -v || die
+}
+
+python_install() {
+ distutils-r1_python_install
+
+ if use mpi; then
+ cd Src/MPI || die
+ python_newexe mpipython-${EPYTHON} mpipython
+ fi
+}
+
+python_install_all() {
+ use doc && HTML_DOCS=( Doc/Reference/. )
+ use mpi && EXAMPLES=( Examples/mpi.py )
+ distutils-r1_python_install_all
+}