summaryrefslogtreecommitdiff
path: root/community/python-scipy
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/python-scipy
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/python-scipy')
-rw-r--r--community/python-scipy/0001-FIX-define-macro-to-access-C99-extensions-from-C.patch43
-rw-r--r--community/python-scipy/ChangeLog29
-rwxr-xr-xcommunity/python-scipy/PKGBUILD40
3 files changed, 112 insertions, 0 deletions
diff --git a/community/python-scipy/0001-FIX-define-macro-to-access-C99-extensions-from-C.patch b/community/python-scipy/0001-FIX-define-macro-to-access-C99-extensions-from-C.patch
new file mode 100644
index 000000000..c58a943b5
--- /dev/null
+++ b/community/python-scipy/0001-FIX-define-macro-to-access-C99-extensions-from-C.patch
@@ -0,0 +1,43 @@
+From 8ed781828b1d8e1692105c0c0c130858d47a28ce Mon Sep 17 00:00:00 2001
+From: Fabian Pedregosa <fabian.pedregosa@inria.fr>
+Date: Sun, 25 Jul 2010 14:35:35 +0200
+Subject: [PATCH] FIX: define macro to access C99 extensions from C++.
+
+This prevented scipy.sparse.sparsetools to compile correctly under
+python2.7, because the wrappers are C++ files but ndarraytypes.h
+references some C99 macros in inttypes.h.
+---
+ scipy/sparse/sparsetools/SConscript | 1 +
+ scipy/sparse/sparsetools/setup.py | 4 +++-
+ 2 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/scipy/sparse/sparsetools/SConscript b/scipy/sparse/sparsetools/SConscript
+index 1aa5557..85d9e05 100644
+--- a/scipy/sparse/sparsetools/SConscript
++++ b/scipy/sparse/sparsetools/SConscript
+@@ -3,6 +3,7 @@
+ from numscons import GetNumpyEnvironment
+
+ env = GetNumpyEnvironment(ARGUMENTS)
++env.PrependUnique(CPPDEFINES = '__STDC_FORMAT_MACROS')
+
+ for fmt in ['csr','csc','coo','bsr','dia']:
+ sources = [ fmt + '_wrap.cxx' ]
+diff --git a/scipy/sparse/sparsetools/setup.py b/scipy/sparse/sparsetools/setup.py
+index f4027a7..c4c4636 100755
+--- a/scipy/sparse/sparsetools/setup.py
++++ b/scipy/sparse/sparsetools/setup.py
+@@ -9,7 +9,9 @@ def configuration(parent_package='',top_path=None):
+ for fmt in ['csr','csc','coo','bsr','dia']:
+ sources = [ fmt + '_wrap.cxx' ]
+ depends = [ fmt + '.h' ]
+- config.add_extension('_' + fmt, sources=sources, depends=depends)
++ config.add_extension('_' + fmt, sources=sources,
++ define_macros=[('__STDC_FORMAT_MACROS', 1)],
++ depends=depends)
+
+ return config
+
+--
+1.7.1.1
+
diff --git a/community/python-scipy/ChangeLog b/community/python-scipy/ChangeLog
new file mode 100644
index 000000000..00071d2a7
--- /dev/null
+++ b/community/python-scipy/ChangeLog
@@ -0,0 +1,29 @@
+2010-07-29 Angel 'angvp' Velasquez <angvp@archlinux.org>
+ * Updated to: 0.8.0
+2009-08-05 Douglas Soares de Andrade <douglas@archlinux.org>
+
+ * Updated to: 0.7.1
+
+2009-02-11 Douglas Soares de Andrade <douglas@archlinux.org>
+
+ * Updating for i686: 0.7
+
+2008-12-12 Douglas Soares de Andrade <douglas@archlinux.org>
+
+ * Updating for i686: 0.7.0 beta 1
+
+2008-11-07 Douglas Soares de Andrade <douglas@archlinux.org>
+
+ * Updated to svn as scipy 0.6 wont work with python 2.6
+
+2008-02-21 Eric Belanger <eric@archlinux.org>
+
+ * Added x86_64 arch tag
+ * Added license
+
+2007-10-29 Douglas Soares de Andrade <dsa@aur.archlinux.org>
+
+ * Changed email
+ * Fixed some problems in the PKGBUILD
+ * Updated to new release - 0.6.0
+
diff --git a/community/python-scipy/PKGBUILD b/community/python-scipy/PKGBUILD
new file mode 100755
index 000000000..d0acce568
--- /dev/null
+++ b/community/python-scipy/PKGBUILD
@@ -0,0 +1,40 @@
+#$Id: PKGBUILD 27301 2010-09-19 16:29:18Z schuay $
+# Maintainer: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
+# Maintainer: Douglas Soares de Andrade <dsa@aur.archlinux.org>
+
+pkgname=python-scipy
+pkgver=0.8.0
+pkgrel=4
+pkgdesc="SciPy (pronounced 'Sigh Pie') is open-source software for mathematics, science, and engineering."
+arch=('i686' 'x86_64')
+url="http://www.scipy.org"
+license=('BSD')
+depends=('lapack' 'blas' 'python2' 'python-numpy')
+makedepends=('gcc' 'gcc-fortran')
+conflicts=('scipy' 'scipy_core')
+source=("http://downloads.sourceforge.net/scipy/scipy-${pkgver}.tar.gz"
+ '0001-FIX-define-macro-to-access-C99-extensions-from-C.patch')
+md5sums=('f0bfc6141b90e6a31555b31486602251'
+ '609759549d0571fc04d52c89b16258ed')
+
+build() {
+ unset LDFLAGS
+ unset FFLAGS
+
+ cd ${srcdir}/scipy-${pkgver}
+ #Changing the arithmetic parameter (Thanks to Fabrizio Castellano)
+ sed -i "s/\#define\ UNK\ 1/\#define\ IBMPC\ 1/" $srcdir/scipy-$pkgver/scipy/special/cephes/mconf.h
+
+ # fix build with python 2.7 (see http://projects.scipy.org/scipy/ticket/1180)
+ patch -p1 < ${srcdir}/0001-FIX-define-macro-to-access-C99-extensions-from-C.patch
+
+ # python2 fix
+ for file in $(find . -name '*.py' -print); do
+ sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file
+ sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
+ done
+
+ python2 setup.py config_fc --fcompiler=gnu95 build
+ python2 setup.py config_fc --fcompiler=gnu95 install --prefix=/usr --root=${pkgdir}
+ install -D -m644 LICENSE.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt
+}