[scipy] Fix scipy build
Toshio くらとみ
toshio at fedoraproject.org
Sat Jul 31 16:00:13 UTC 2010
commit 617a6d6ca1ded2b5c0b6b8ef08cc15f0326aa082
Author: Toshio Kuratomi <toshio at fedoraproject.org>
Date: Sat Jul 31 11:59:56 2010 -0400
Fix scipy build
scipy-py27-backport.patch | 27 +++++++++++++++++++++++++++
scipy.spec | 6 ++++++
2 files changed, 33 insertions(+), 0 deletions(-)
---
diff --git a/scipy-py27-backport.patch b/scipy-py27-backport.patch
new file mode 100644
index 0000000..68eb4a4
--- /dev/null
+++ b/scipy-py27-backport.patch
@@ -0,0 +1,27 @@
+Index: scipy-0.7.2/scipy/sparse/sparsetools/SConscript
+===================================================================
+--- scipy-0.7.2.orig/scipy/sparse/sparsetools/SConscript
++++ scipy-0.7.2/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' ]
+Index: scipy-0.7.2/scipy/sparse/sparsetools/setup.py
+===================================================================
+--- scipy-0.7.2.orig/scipy/sparse/sparsetools/setup.py
++++ scipy-0.7.2/scipy/sparse/sparsetools/setup.py
+@@ -8,7 +8,9 @@ def configuration(parent_package='',top_
+
+ for fmt in ['csr','csc','coo','bsr','dia']:
+ sources = [ fmt + '_wrap.cxx' ]
+- config.add_extension('_' + fmt, sources=sources)
++ config.add_extension('_' + fmt, sources=sources,
++ define_macros=[('__STDC_FORMAT_MACROS', 1)],
++ )
+
+ return config
+
diff --git a/scipy.spec b/scipy.spec
index 2d97407..03f90f9 100644
--- a/scipy.spec
+++ b/scipy.spec
@@ -14,6 +14,8 @@ Source1: stsci_image_setup.py
Source2: stsci_convolve_setup.py
Patch0: stsci_image_syntax.patch
Patch1: scipy_gcc43.patch
+# Backport of python-2.7 build fixes upstream
+Patch2: scipy-py27-backport.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: numpy, python-devel,f2py
@@ -39,6 +41,7 @@ leading scientists and engineers.
%setup -q -n %{name}-%{version}
%patch0 -p0
%patch1 -p1
+%patch2 -p1
cat > site.cfg << EOF
[amd]
library_dirs = %{_libdir}
@@ -76,6 +79,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Fri Jul 31 2010 Toshio Kuratomi <toshio at fedoraproject.org> - 0.7.2-3
+- Fix scipy build on python-2.7
+
* Thu Jul 22 2010 David Malcolm <dmalcolm at redhat.com> - 0.7.2-2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
More information about the scm-commits
mailing list