rpms/numpy/FC-5 numpy-0.9.8-check_types.patch, NONE, 1.1 numpy-0.9.8-gfortran.patch, NONE, 1.1 .cvsignore, 1.4, 1.5 numpy.spec, 1.5, 1.6 sources, 1.4, 1.5

Jarod Wilson (jwilson) fedora-extras-commits at redhat.com
Mon Sep 25 16:54:51 UTC 2006


Author: jwilson

Update of /cvs/extras/rpms/numpy/FC-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27642

Modified Files:
	.cvsignore numpy.spec sources 
Added Files:
	numpy-0.9.8-check_types.patch numpy-0.9.8-gfortran.patch 
Log Message:
Bump to 0.9.8

numpy-0.9.8-check_types.patch:

--- NEW FILE numpy-0.9.8-check_types.patch ---
diff -ur numpy-0.9.8.orig/numpy/core/numeric.py numpy-0.9.8/numpy/core/numeric.py
--- numpy-0.9.8.orig/numpy/core/numeric.py	2006-05-17 18:48:38.000000000 -0400
+++ numpy-0.9.8/numpy/core/numeric.py	2006-09-05 16:23:00.000000000 -0400
@@ -11,6 +11,7 @@
            'array2string', 'get_printoptions', 'set_printoptions',
            'array_repr', 'array_str', 'set_string_function',
            'little_endian',
+           'fromiter',
            'indices', 'fromfunction',
            'load', 'loads', 'isscalar', 'binary_repr', 'base_repr',
            'ones', 'identity', 'allclose',
@@ -67,6 +68,10 @@
 
 # end Fernando's utilities
 
+def fromiter(obj, dtype=None):
+    obj = list(obj)
+    return array(obj, dtype=dtype)
+
 def extend_all(module):
     adict = {}
     for a in __all__:
diff -ur numpy-0.9.8.orig/numpy/core/src/arrayobject.c numpy-0.9.8/numpy/core/src/arrayobject.c
--- numpy-0.9.8.orig/numpy/core/src/arrayobject.c	2006-05-13 23:42:32.000000000 -0400
+++ numpy-0.9.8/numpy/core/src/arrayobject.c	2006-09-05 16:26:47.000000000 -0400
@@ -7287,9 +7287,10 @@
    adjusted */
 
 /*OBJECT_API
-  Adjusts previously broadcasted iterators so that the largest axis is not iterated 
-  over.  Returns dimension which is largest in the range [0,multi->nd).  A -1 
-  is returned if multi->nd == 0.
+  Adjusts previously broadcasted iterators so that the largest axis
+  is not iterated over.
+  Returns dimension which is largest in the range [0,multi->nd).
+  A -1 is returned if multi->nd == 0.
  */
 static int
 PyArray_RemoveLargest(PyArrayMultiIterObject *multi)
diff -ur numpy-0.9.8.orig/numpy/core/src/scalartypes.inc.src numpy-0.9.8/numpy/core/src/scalartypes.inc.src
--- numpy-0.9.8.orig/numpy/core/src/scalartypes.inc.src	2006-05-17 14:56:32.000000000 -0400
+++ numpy-0.9.8/numpy/core/src/scalartypes.inc.src	2006-09-05 16:28:32.000000000 -0400
@@ -1600,12 +1600,15 @@
 
 /* string and unicode inherit from Python Type first and so GET_ITEM is different to
    get to the Python Type.
+   ok is a work-around for a bug in complex_new that doesn't allocate
+   memory from the sub-types memory allocator.
  */
 
 /**begin repeat 
 #name=byte, short, int, long, longlong, ubyte, ushort, uint, ulong, ulonglong, float, double, longdouble, cfloat, cdouble, clongdouble, string, unicode, object#
 #TYPE=BYTE, SHORT, INT, LONG, LONGLONG, UBYTE, USHORT, UINT, ULONG, ULONGLONG, FLOAT, DOUBLE, LONGDOUBLE, CFLOAT, CDOUBLE, CLONGDOUBLE, STRING, UNICODE, OBJECT#
 #num=1*16,0,0,1#
+#ok=0,0,1,1,1,0,0,0,0,0,0,1,0,0,0,0,1,1,1#
 */
 static PyObject *
 @name at _arrtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
@@ -1614,6 +1617,7 @@
 	PyObject *arr;
 	PyArray_Descr *typecode;
 
+#if @ok@
 	if (type->tp_bases && (PyTuple_GET_SIZE(type->tp_bases)==2)) {
 		PyTypeObject *sup;
 		PyObject *ret;
@@ -1625,6 +1629,7 @@
 		PyErr_Clear();
 		/* now do default conversion */
 	}
+#endif
 
 	if (!PyArg_ParseTuple(args, "O", &obj)) return NULL;
 
diff -ur numpy-0.9.8.orig/numpy/core/tests/test_scalarmath.py numpy-0.9.8/numpy/core/tests/test_scalarmath.py
--- numpy-0.9.8.orig/numpy/core/tests/test_scalarmath.py	2006-05-10 18:51:12.000000000 -0400
+++ numpy-0.9.8/numpy/core/tests/test_scalarmath.py	2006-09-05 16:28:58.000000000 -0400
@@ -11,55 +11,22 @@
          N.single, N.double, N.longdouble, N.csingle,
          N.cdouble, N.clongdouble]
 
-# These were generated using old umath
-typeconv = array([
-    [ 0,  1,  2,  3,  4,  5,  6,  5,  6,  9, 10, 11, 12, 13, 14, 15, 16],
-    [ 1,  1,  3,  3,  4,  5,  6,  5,  6,  9, 10, 11, 12, 13, 14, 15, 16],
-    [ 2,  3,  2,  3,  4,  5,  6,  5,  6,  9, 10, 11, 12, 13, 14, 15, 16],
-    [ 3,  3,  3,  3,  5,  5,  6,  5,  6,  9, 10, 11, 12, 13, 14, 15, 16],
-    [ 4,  4,  4,  5,  4,  5,  6,  5,  6,  9, 10, 11, 12, 13, 14, 15, 16],
-    [ 5,  5,  5,  5,  5,  5,  9,  5,  9,  9, 10, 12, 12, 13, 15, 15, 16],
-    [ 6,  6,  6,  6,  6,  9,  6,  9,  6,  9, 10, 12, 12, 13, 15, 15, 16],
-    [ 7,  7,  7,  7,  7,  7,  9,  7,  9,  9, 10, 12, 12, 13, 15, 15, 16],
-    [ 8,  8,  8,  8,  8,  9,  8,  9,  8,  9, 10, 12, 12, 13, 15, 15, 16],
-    [ 9,  9,  9,  9,  9,  9,  9,  9,  9,  9, 12, 12, 12, 13, 15, 15, 16],
-    [10, 10, 10, 10, 10, 10, 10, 10, 10, 12, 10, 12, 12, 13, 15, 15, 16],
-    [11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 11, 12, 13, 14, 15, 16],
-    [12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 15, 15, 16],
-    [13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 16, 16, 16],
-    [14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 14, 15, 16, 14, 15, 16],
-    [15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 15, 15, 16],
-    [16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16]
-    ])
-
-typeconv2 = array([
-    ['?','b','B','h','H','i','I','i','I','q','Q','f','d','g','F','D','G'],
-    ['b','b','h','h','H','i','I','i','I','q','Q','f','d','g','F','D','G'],
-    ['B','h','B','h','H','i','I','i','I','q','Q','f','d','g','F','D','G'],
-    ['h','h','h','h','i','i','I','i','I','q','Q','f','d','g','F','D','G'],
-    ['H','H','H','i','H','i','I','i','I','q','Q','f','d','g','F','D','G'],
-    ['i','i','i','i','i','i','q','i','q','q','Q','d','d','g','D','D','G'],
-    ['I','I','I','I','I','q','I','q','I','q','Q','d','d','g','D','D','G'],
-    ['l','l','l','l','l','l','q','l','q','q','Q','d','d','g','D','D','G'],
-    ['L','L','L','L','L','q','L','q','L','q','Q','d','d','g','D','D','G'],
-    ['q','q','q','q','q','q','q','q','q','q','d','d','d','g','D','D','G'],
-    ['Q','Q','Q','Q','Q','Q','Q','Q','Q','d','Q','d','d','g','D','D','G'],
-    ['f','f','f','f','f','d','d','d','d','d','d','f','d','g','F','D','G'],
-    ['d','d','d','d','d','d','d','d','d','d','d','d','d','g','D','D','G'],
-    ['g','g','g','g','g','g','g','g','g','g','g','g','g','g','G','G','G'],
-    ['F','F','F','F','F','D','D','D','D','D','D','F','D','G','F','D','G'],
-    ['D','D','D','D','D','D','D','D','D','D','D','D','D','G','D','D','G'],
-    ['G','G','G','G','G','G','G','G','G','G','G','G','G','G','G','G','G']
-    ],'S1')
+# This compares scalarmath against ufuncs.
 
 class test_types(ScipyTestCase):
     def check_types(self, level=1):
         # list of types
         for k, atype in enumerate(types):
             vala = atype(3)
+            val1 = array([3],dtype=atype)
             for l, btype in enumerate(types):
                 valb = btype(1)
+                val2 = array([1],dtype=btype)
                 val = vala+valb
-                assert val.dtype.num == typeconv[k,l] and \
-                       val.dtype.char == typeconv2[k,l], \
+                valo = val1 + val2
+                assert val.dtype.num == valo.dtype.num and \
+                       val.dtype.char == valo.dtype.char, \
                        "error with (%d,%d)" % (k,l)
+
+if __name__ == "__main__":
+    NumpyTest().run()

numpy-0.9.8-gfortran.patch:

--- NEW FILE numpy-0.9.8-gfortran.patch ---
diff -ur numpy-0.9.8.orig/numpy/distutils/fcompiler/gnu.py numpy-0.9.8/numpy/distutils/fcompiler/gnu.py
--- numpy-0.9.8.orig/numpy/distutils/fcompiler/gnu.py	2006-04-10 03:21:26.000000000 -0400
+++ numpy-0.9.8/numpy/distutils/fcompiler/gnu.py	2006-09-05 11:54:22.000000000 -0400
@@ -30,7 +30,7 @@
         'compiler_f77' : [fc_exe,"-Wall","-fno-second-underscore"],
         'compiler_f90' : None,
         'compiler_fix' : None,
-        'linker_so'    : [fc_exe,"-Wall"],
+        'linker_so'    : [fc_exe,"-shared", "-Wall"],
         'archiver'     : ["ar", "-cr"],
         'ranlib'       : ["ranlib"],
         'linker_exe'   : [fc_exe,"-Wall"]
@@ -237,7 +237,7 @@
         'compiler_f77' : [fc_exe,"-Wall","-ffixed-form","-fno-second-underscore"],
         'compiler_f90' : [fc_exe,"-Wall","-fno-second-underscore"],
         'compiler_fix' : [fc_exe,"-Wall","-ffixed-form","-fno-second-underscore"],
-        'linker_so'    : [fc_exe,"-Wall"],
+        'linker_so'    : [fc_exe,"-shared", "-Wall"],
         'archiver'     : ["ar", "-cr"],
         'ranlib'       : ["ranlib"],
         'linker_exe'   : [fc_exe,"-Wall"]


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/numpy/FC-5/.cvsignore,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- .cvsignore	27 Apr 2006 00:47:33 -0000	1.4
+++ .cvsignore	25 Sep 2006 16:54:50 -0000	1.5
@@ -1 +1,2 @@
 numpy-0.9.6.tar.gz
+numpy-0.9.8.tar.gz


Index: numpy.spec
===================================================================
RCS file: /cvs/extras/rpms/numpy/FC-5/numpy.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- numpy.spec	27 Apr 2006 00:47:33 -0000	1.5
+++ numpy.spec	25 Sep 2006 16:54:50 -0000	1.6
@@ -1,8 +1,9 @@
-%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+# eval to 2.3 if python isn't yet present, workaround for no python in fc4 minimal buildroot
+%{!?python_version: %define python_version %(%{__python} -c 'import sys; print sys.version.split(" ")[0]' || echo "2.3")}
 
 Name:           numpy
-Version:        0.9.6
+Version:        0.9.8
 Release:        1%{?dist}
 Summary:        A fast multidimensional array facility for Python
 
@@ -10,12 +11,12 @@
 License:        BSD
 URL:            http://numeric.scipy.org/
 Source0:        http://dl.sourceforge.net/numpy/%{name}-%{version}.tar.gz
-Patch:          numpy-0.9.4-f2pynumpy.patch
-Patch1:         numpy-0.9.4-gfortran.patch
+Patch0:         numpy-0.9.4-f2pynumpy.patch
+Patch1:         numpy-0.9.8-gfortran.patch
+Patch2:         numpy-0.9.8-check_types.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  python-devel atlas-devel blas-devel lapack-devel python-setuptools gcc-gfortran
-Requires:   python-abi = %(%{__python} -c "import sys ; print sys.version[:3]")
 
 %description
 The Numeric Python extensions is a set of extensions to the Python programming
@@ -31,11 +32,14 @@
 
 %prep
 %setup -q
-%patch -p1 -b .f2pynumpy
+%patch0 -p1 -b .f2pynumpy
 %patch1 -p1 -b .gfortran
+%patch2 -p1 -b .check_types
 
 %build
-FFTW=%{_libdir} BLAS=%{_libdir} LAPACK=%{_libdir} CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
+ATLAS=%{_libdir} FFTW=%{_libdir} BLAS=%{_libdir} \
+    LAPACK=%{_libdir} CFLAGS="$RPM_OPT_FLAGS" \
+    %{__python} setup.py build
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -64,6 +68,9 @@
 %{python_sitearch}/%{name}
 
 %changelog
+* Tue Sep 06 2006 Jarod Wilson <jwilson at redhat.com> 0.9.8-1
+- New upstream release
+
 * Wed Apr 26 2006 Ignacio Vazquez-Abrams <ivazquez at ivazquez.net> 0.9.6-1
 - Upstream update
 


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/numpy/FC-5/sources,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- sources	27 Apr 2006 00:47:33 -0000	1.4
+++ sources	25 Sep 2006 16:54:50 -0000	1.5
@@ -1 +1 @@
-eac9ae05bd7511cecf1ffd12da0e1993  numpy-0.9.6.tar.gz
+ca528d2b460a6567d70bb6bdf0dc1805  numpy-0.9.8.tar.gz




More information about the fedora-extras-commits mailing list