Update to 0.9.0

Drop all stsci sources and patches, dropped from upstream
Drop gcc and py27 patches fixed upstream
Add %check section to run tests
This commit is contained in:
Orion Poplawski 2011-04-01 10:17:52 -06:00
parent 7f7243164d
commit 50c7e098db
8 changed files with 16 additions and 495 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
scipy-0.7.2.tar.gz
/scipy-0.9.0.tar.gz

View File

@ -1,27 +0,0 @@
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

View File

@ -1,21 +1,13 @@
%define python_sitearch %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)')
Summary: Scipy: Scientific Tools for Python
Name: scipy
Version: 0.7.2
Release: 3%{?dist}
Version: 0.9.0
Release: 1%{?dist}
Group: Development/Libraries
License: BSD and LGPLv2+
Url: http://www.scipy.org
Source0: http://prdownloads.sourceforge.net/scipy/%{name}-%{version}.tar.gz
# Missing setup.py files which control the build of this module
# These should be removed as soon as upstream pushes a release with this fixed
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,9 +31,6 @@ leading scientists and engineers.
%prep
%setup -q -n %{name}-%{version}
%patch0 -p0
%patch1 -p1
%patch2 -p1
cat > site.cfg << EOF
[amd]
library_dirs = %{_libdir}
@ -54,8 +43,6 @@ include_dirs = /usr/include/suitesparse:/usr/include/ufsparse
umfpack_libs = umfpack
EOF
cp %{SOURCE1} scipy/stsci/image/setup.py
cp %{SOURCE2} scipy/stsci/convolve/setup.py
%build
env CFLAGS="$RPM_OPT_FLAGS" ATLAS=%{_libdir}/atlas FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} python setup.py config_fc --fcompiler=gnu95 --noarch build
@ -66,6 +53,12 @@ rm -rf $RPM_BUILD_ROOT
env CFLAGS="$RPM_OPT_FLAGS" ATLAS=%{_libdir}/atlas FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} python setup.py install --root=$RPM_BUILD_ROOT
%check
mkdir test
cd test
PYTHONPATH=$RPM_BUILD_ROOT%{python_sitearch} python -c "import scipy; scipy.test('full')"
%clean
rm -rf $RPM_BUILD_ROOT
@ -79,6 +72,12 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Fri Apr 1 2011 Orion Poplawski <orion@cora.nwra.com> - 0.9.0-1
- Update to 0.9.0
- Drop all stsci sources and patches, dropped from upstream
- Drop gcc and py27 patches fixed upstream
- Add %%check section to run tests
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

View File

@ -1,389 +0,0 @@
diff -r -u scipy-0.7.0.old/scipy/weave/blitz/blitz/funcs.h scipy-0.7.0/scipy/weave/blitz/blitz/funcs.h
--- scipy-0.7.0.old/scipy/weave/blitz/blitz/funcs.h 2009-02-10 17:59:17.000000000 -0900
+++ scipy-0.7.0/scipy/weave/blitz/blitz/funcs.h 2009-06-14 14:58:47.000000000 -0800
@@ -25,10 +25,12 @@
#include <blitz/promote.h>
#include <blitz/prettyprint.h>
+#include <cstdlib>
+
BZ_NAMESPACE(blitz)
-
+
/* Helper functions */
-
+
template <typename T>
inline T blitz_sqr(T x)
{ return x*x; }
@@ -59,7 +61,7 @@
/* Unary functions that return same type as argument */
-
+
#define BZ_DEFINE_UNARY_FUNC(name,fun) \
template<typename T_numtype1> \
struct name { \
@@ -68,7 +70,7 @@
static inline T_numtype \
apply(T_numtype1 a) \
{ return fun(a); } \
- \
+ \
template<typename T1> \
static inline void prettyPrint(BZ_STD_SCOPE(string) &str, \
prettyPrintFormat& format, const T1& t1) \
@@ -114,13 +116,13 @@
BZ_DEFINE_UNARY_FUNC(Fn_y0,BZ_IEEEMATHFN_SCOPE(y0))
BZ_DEFINE_UNARY_FUNC(Fn_y1,BZ_IEEEMATHFN_SCOPE(y1))
#endif
-
+
#ifdef BZ_HAVE_SYSTEM_V_MATH
BZ_DEFINE_UNARY_FUNC(Fn__class,BZ_IEEEMATHFN_SCOPE(_class))
BZ_DEFINE_UNARY_FUNC(Fn_nearest,BZ_IEEEMATHFN_SCOPE(nearest))
BZ_DEFINE_UNARY_FUNC(Fn_rsqrt,BZ_IEEEMATHFN_SCOPE(rsqrt))
#endif
-
+
BZ_DEFINE_UNARY_FUNC(Fn_sqr,BZ_BLITZ_SCOPE(blitz_sqr))
BZ_DEFINE_UNARY_FUNC(Fn_cube,BZ_BLITZ_SCOPE(blitz_cube))
BZ_DEFINE_UNARY_FUNC(Fn_pow4,BZ_BLITZ_SCOPE(blitz_pow4))
@@ -130,7 +132,7 @@
BZ_DEFINE_UNARY_FUNC(Fn_pow8,BZ_BLITZ_SCOPE(blitz_pow8))
/* Unary functions that return a specified type */
-
+
#define BZ_DEFINE_UNARY_FUNC_RET(name,fun,ret) \
template<typename T_numtype1> \
struct name { \
@@ -139,7 +141,7 @@
static inline T_numtype \
apply(T_numtype1 a) \
{ return fun(a); } \
- \
+ \
template<typename T1> \
static inline void prettyPrint(BZ_STD_SCOPE(string) &str, \
prettyPrintFormat& format, const T1& t1) \
@@ -154,16 +156,16 @@
#ifdef BZ_HAVE_IEEE_MATH
BZ_DEFINE_UNARY_FUNC_RET(Fn_ilogb,BZ_IEEEMATHFN_SCOPE(ilogb),int)
#endif
-
+
#ifdef BZ_HAVE_SYSTEM_V_MATH
BZ_DEFINE_UNARY_FUNC_RET(Fn_itrunc,BZ_IEEEMATHFN_SCOPE(itrunc),int)
BZ_DEFINE_UNARY_FUNC_RET(Fn_uitrunc,BZ_IEEEMATHFN_SCOPE(uitrunc),unsigned int)
#endif
-
-
+
+
#ifdef BZ_HAVE_COMPLEX
/* Specialization of unary functor for complex type */
-
+
#define BZ_DEFINE_UNARY_CFUNC(name,fun) \
template<typename T> \
struct name< complex<T> > { \
@@ -173,7 +175,7 @@
static inline T_numtype \
apply(T_numtype1 a) \
{ return fun(a); } \
- \
+ \
template<typename T1> \
static inline void prettyPrint(BZ_STD_SCOPE(string) &str, \
prettyPrintFormat& format, const T1& t1) \
@@ -211,7 +213,7 @@
BZ_DEFINE_UNARY_CFUNC(Fn_pow8,BZ_BLITZ_SCOPE(blitz_pow8))
/* Unary functions that apply only to complex<T> and return T */
-
+
#define BZ_DEFINE_UNARY_CFUNC2(name,fun) \
template<typename T_numtype1> \
struct name; \
@@ -224,7 +226,7 @@
static inline T_numtype \
apply(T_numtype1 a) \
{ return fun(a); } \
- \
+ \
template<typename T1> \
static inline void prettyPrint(BZ_STD_SCOPE(string) &str, \
prettyPrintFormat& format, const T1& t1) \
@@ -242,11 +244,11 @@
BZ_DEFINE_UNARY_CFUNC2(Fn_norm,BZ_CMATHFN_SCOPE(norm))
BZ_DEFINE_UNARY_CFUNC2(Fn_real,BZ_CMATHFN_SCOPE(real))
#endif // BZ_HAVE_COMPLEX_FCNS
-
+
#endif // BZ_HAVE_COMPLEX
-
+
/* Binary functions that return type based on type promotion */
-
+
#define BZ_DEFINE_BINARY_FUNC(name,fun) \
template<typename T_numtype1, typename T_numtype2> \
struct name { \
@@ -255,7 +257,7 @@
static inline T_numtype \
apply(T_numtype1 a, T_numtype2 b) \
{ return fun(a,b); } \
- \
+ \
template<typename T1, typename T2> \
static inline void prettyPrint(BZ_STD_SCOPE(string) &str, \
prettyPrintFormat& format, const T1& t1, \
@@ -273,7 +275,7 @@
BZ_DEFINE_BINARY_FUNC(Fn_atan2,BZ_MATHFN_SCOPE(atan2))
BZ_DEFINE_BINARY_FUNC(Fn_fmod,BZ_MATHFN_SCOPE(fmod))
BZ_DEFINE_BINARY_FUNC(Fn_pow,BZ_MATHFN_SCOPE(pow))
-
+
#ifdef BZ_HAVE_SYSTEM_V_MATH
BZ_DEFINE_BINARY_FUNC(Fn_copysign,BZ_IEEEMATHFN_SCOPE(copysign))
BZ_DEFINE_BINARY_FUNC(Fn_drem,BZ_IEEEMATHFN_SCOPE(drem))
@@ -282,9 +284,9 @@
BZ_DEFINE_BINARY_FUNC(Fn_remainder,BZ_IEEEMATHFN_SCOPE(remainder))
BZ_DEFINE_BINARY_FUNC(Fn_scalb,BZ_IEEEMATHFN_SCOPE(scalb))
#endif
-
+
/* Binary functions that return a specified type */
-
+
#define BZ_DEFINE_BINARY_FUNC_RET(name,fun,ret) \
template<typename T_numtype1, typename T_numtype2> \
struct name { \
@@ -293,7 +295,7 @@
static inline T_numtype \
apply(T_numtype1 a, T_numtype2 b) \
{ return fun(a,b); } \
- \
+ \
template<typename T1, typename T2> \
static inline void prettyPrint(BZ_STD_SCOPE(string) &str, \
prettyPrintFormat& format, const T1& t1, \
@@ -311,10 +313,10 @@
#ifdef BZ_HAVE_SYSTEM_V_MATH
BZ_DEFINE_BINARY_FUNC_RET(Fn_unordered,BZ_IEEEMATHFN_SCOPE(unordered),int)
#endif
-
+
#ifdef BZ_HAVE_COMPLEX
/* Specialization of binary functor for complex type */
-
+
#define BZ_DEFINE_BINARY_CFUNC(name,fun) \
template<typename T> \
struct name< complex<T>, complex<T> > { \
@@ -325,7 +327,7 @@
static inline T_numtype \
apply(T_numtype1 a, T_numtype2 b) \
{ return fun(a,b); } \
- \
+ \
template<typename T1, typename T2> \
static inline void prettyPrint(BZ_STD_SCOPE(string) &str, \
prettyPrintFormat& format, const T1& t1, \
@@ -349,7 +351,7 @@
static inline T_numtype \
apply(T_numtype1 a, T_numtype2 b) \
{ return fun(a,b); } \
- \
+ \
template<typename T1, typename T2> \
static inline void prettyPrint(BZ_STD_SCOPE(string) &str, \
prettyPrintFormat& format, const T1& t1, \
@@ -373,7 +375,7 @@
static inline T_numtype \
apply(T_numtype1 a, T_numtype2 b) \
{ return fun(a,b); } \
- \
+ \
template<typename T1, typename T2> \
static inline void prettyPrint(BZ_STD_SCOPE(string) &str, \
prettyPrintFormat& format, const T1& t1, \
@@ -393,7 +395,7 @@
#endif
/* Binary functions that apply only to T and return complex<T> */
-
+
#define BZ_DEFINE_BINARY_FUNC_CRET(name,fun) \
template<typename T_numtype1, typename T_numtype2> \
struct name; \
@@ -407,7 +409,7 @@
static inline T_numtype \
apply(T_numtype1 a, T_numtype2 b) \
{ return fun(a,b); } \
- \
+ \
template<typename T1, typename T2> \
static inline void prettyPrint(BZ_STD_SCOPE(string) &str, \
prettyPrintFormat& format, const T1& t1, \
@@ -425,11 +427,11 @@
#ifdef BZ_HAVE_COMPLEX_FCNS
BZ_DEFINE_BINARY_FUNC_CRET(Fn_polar,BZ_CMATHFN_SCOPE(polar))
#endif
-
+
#endif // BZ_HAVE_COMPLEX
-
+
/* Ternary functions that return type based on type promotion */
-
+
#define BZ_DEFINE_TERNARY_FUNC(name,fun) \
template <typename P_numtype1, typename P_numtype2, \
typename P_numtype3> \
@@ -458,7 +460,7 @@
};
/* Ternary functions that return a specified type */
-
+
#define BZ_DEFINE_TERNARY_FUNC_RET(name,fun,ret) \
template <typename P_numtype1, typename P_numtype2, \
typename P_numtype3> \
@@ -485,9 +487,9 @@
} \
};
-
+
/* These functions don't quite fit the usual patterns */
-
+
// abs() Absolute value
template<typename T_numtype1>
struct Fn_abs;
@@ -497,11 +499,11 @@
struct Fn_abs< int > {
typedef int T_numtype1;
typedef int T_numtype;
-
+
static inline T_numtype
apply(T_numtype1 a)
{ return BZ_MATHFN_SCOPE(abs)(a); }
-
+
template<typename T1>
static inline void prettyPrint(BZ_STD_SCOPE(string) &str,
prettyPrintFormat& format, const T1& t1)
@@ -518,11 +520,11 @@
struct Fn_abs< long int > {
typedef long int T_numtype1;
typedef long int T_numtype;
-
+
static inline T_numtype
apply(T_numtype1 a)
{ return BZ_MATHFN_SCOPE(labs)(a); }
-
+
template<typename T1>
static inline void prettyPrint(BZ_STD_SCOPE(string) &str,
prettyPrintFormat& format, const T1& t1)
@@ -539,11 +541,11 @@
struct Fn_abs< float > {
typedef float T_numtype1;
typedef float T_numtype;
-
+
static inline T_numtype
apply(T_numtype1 a)
{ return BZ_MATHFN_SCOPE(fabs)(a); }
-
+
template<typename T1>
static inline void prettyPrint(BZ_STD_SCOPE(string) &str,
prettyPrintFormat& format, const T1& t1)
@@ -560,11 +562,11 @@
struct Fn_abs< double > {
typedef double T_numtype1;
typedef double T_numtype;
-
+
static inline T_numtype
apply(T_numtype1 a)
{ return BZ_MATHFN_SCOPE(fabs)(a); }
-
+
template<typename T1>
static inline void prettyPrint(BZ_STD_SCOPE(string) &str,
prettyPrintFormat& format, const T1& t1)
@@ -581,11 +583,11 @@
struct Fn_abs< long double > {
typedef long double T_numtype1;
typedef long double T_numtype;
-
+
static inline T_numtype
apply(T_numtype1 a)
{ return BZ_MATHFN_SCOPE(fabs)(a); }
-
+
template<typename T1>
static inline void prettyPrint(BZ_STD_SCOPE(string) &str,
prettyPrintFormat& format, const T1& t1)
@@ -603,11 +605,11 @@
struct Fn_abs< complex<T> > {
typedef complex<T> T_numtype1;
typedef T T_numtype;
-
+
static inline T_numtype
apply(T_numtype1 a)
{ return BZ_CMATHFN_SCOPE(abs)(a); }
-
+
template<typename T1>
static inline void prettyPrint(BZ_STD_SCOPE(string) &str,
prettyPrintFormat& format, const T1& t1)
@@ -626,7 +628,7 @@
template<typename T_numtype1>
struct Fn_isnan {
typedef int T_numtype;
-
+
static inline T_numtype
apply(T_numtype1 a)
{
@@ -636,7 +638,7 @@
return BZ_IEEEMATHFN_SCOPE(isnan)(a);
#endif
}
-
+
template<typename T1>
static inline void prettyPrint(BZ_STD_SCOPE(string) &str,
prettyPrintFormat& format, const T1& t1)
@@ -654,7 +656,7 @@
template<typename T_numtype1, typename T_cast>
struct Cast {
typedef T_cast T_numtype;
-
+
static inline T_numtype
apply(T_numtype1 a)
{ return T_numtype(a); }
diff -r -u scipy-0.7.0.old/scipy/weave/blitz/blitz/mathfunc.h scipy-0.7.0/scipy/weave/blitz/blitz/mathfunc.h
--- scipy-0.7.0.old/scipy/weave/blitz/blitz/mathfunc.h 2009-02-10 17:59:17.000000000 -0900
+++ scipy-0.7.0/scipy/weave/blitz/blitz/mathfunc.h 2009-06-14 14:58:57.000000000 -0800
@@ -12,6 +12,8 @@
#include <blitz/prettyprint.h>
#endif
+#include <cstdlib>
+
BZ_NAMESPACE(blitz)
// abs(P_numtype1) Absolute value

View File

@ -1 +1 @@
33f883f5ea4227de7097c47d70d5402a scipy-0.7.2.tar.gz
ebfef6e8e82d15c875a4ee6a46d4e1cd scipy-0.9.0.tar.gz

View File

@ -1,26 +0,0 @@
#!/usr/bin/env python
import numpy
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('convolve',parent_package,top_path,
package_path='lib')
config.add_extension('_correlate',
sources=["src/_correlatemodule.c"],
define_macros = [('NUMPY', '1')],
include_dirs = [numpy.get_numarray_include()])
config.add_extension('_lineshape',
sources=["src/_lineshapemodule.c"],
define_macros = [('NUMPY', '1')],
include_dirs = [numpy.get_numarray_include()])
return config
if __name__ == "__main__":
from numpy.distutils.core import setup
config = configuration(top_path='').todict()
setup(author='Todd Miller',
author_email = 'help@stsci.edu',
description = 'image array convolution functions',
version = '2.0',
**config)

View File

@ -1,21 +0,0 @@
#!/usr/bin/env python
import numpy
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration('image',parent_package,top_path,
package_path='lib')
config.add_extension('_combine',
sources=["src/_combinemodule.c"],
define_macros = [('NUMPY', '1')],
include_dirs = [numpy.get_numarray_include()])
return config
if __name__ == "__main__":
from numpy.distutils.core import setup
config = configuration(top_path='').todict()
setup(author='Todd Miller',
author_email = 'help@stsci.edu',
description = 'image array manipulation functions',
version = '2.0',
**config)

View File

@ -1,16 +0,0 @@
--- scipy/stsci/image/lib/_image.py 2008-11-24 10:52:40.000000000 +0100
+++ scipy/stsci/image/lib/_image.py 2009-02-26 16:43:44.000000000 +0100
@@ -1,5 +1,5 @@
import numpy as np
-import scipy.stsci.convolve
+import scipy.stsci.convolve as convolve
import scipy.stsci.convolve._correlate as _correlate
def _translate(a, dx, dy, output=None, mode="nearest", cval=0.0):
@@ -55,4 +55,4 @@
if output is not None:
output._copyFrom(np.rot90(output, -rotation%4))
else:
- return np.rot90(d, -rotation % 4).astype(a.type())
+ return np.rot90(d, -rotation % 4).astype(a.dtype)