[Python-modules-commits] r23402 - in packages/scipy/trunk/debian (6 files)

jtaylor-guest at users.alioth.debian.org jtaylor-guest at users.alioth.debian.org
Sun Jan 27 16:52:48 UTC 2013


    Date: Sunday, January 27, 2013 @ 16:52:45
  Author: jtaylor-guest
Revision: 23402

New upstream release

refresh patches:
 - drop interpnd-generator.patch
 - new: BUG-remove-inline-statement-rejected-by-cython.patch
 - new: BUG-fix-dependency-on-dict-ordering-in-test.patch

Added:
  packages/scipy/trunk/debian/patches/BUG-fix-dependency-on-dict-ordering-in-test.patch
  packages/scipy/trunk/debian/patches/BUG-remove-inline-statement-rejected-by-cython.patch
Modified:
  packages/scipy/trunk/debian/changelog
  packages/scipy/trunk/debian/orig-tar.sh
  packages/scipy/trunk/debian/patches/series
Deleted:
  packages/scipy/trunk/debian/patches/interpnd-generator.patch

Modified: packages/scipy/trunk/debian/changelog
===================================================================
--- packages/scipy/trunk/debian/changelog	2013-01-25 21:03:36 UTC (rev 23401)
+++ packages/scipy/trunk/debian/changelog	2013-01-27 16:52:45 UTC (rev 23402)
@@ -1,3 +1,13 @@
+python-scipy (0.11.0+dfsg1-1) experimental; urgency=low
+
+  * New upstream release
+  * refresh patches:
+    - drop interpnd-generator.patch
+    - new: BUG-remove-inline-statement-rejected-by-cython.patch
+    - new: BUG-fix-dependency-on-dict-ordering-in-test.patch
+
+ -- Julian Taylor <jtaylor.debian at googlemail.com>  Fri, 25 Jan 2013 23:54:43 +0100
+
 python-scipy (0.10.1+dfsg2-1) unstable; urgency=low
 
   * add missing cython and swig sources from git tag (Closes: #589731)

Modified: packages/scipy/trunk/debian/orig-tar.sh
===================================================================
--- packages/scipy/trunk/debian/orig-tar.sh	2013-01-25 21:03:36 UTC (rev 23401)
+++ packages/scipy/trunk/debian/orig-tar.sh	2013-01-27 16:52:45 UTC (rev 23402)
@@ -22,26 +22,29 @@
 scipy/sparse/sparsetools/coo.i \
 scipy/sparse/sparsetools/bsr.i \
 scipy/cluster/_vq_rewrite.pyx \
-scipy/interpolate/interpnd.pyx \
+scipy/interpolate/interpnd.pyx.in \
 scipy/io/matlab/mio5_utils.pyx \
 scipy/io/matlab/mio_utils.pyx \
 scipy/io/matlab/pyalloc.pxd \
 scipy/io/matlab/streams.pxd \
 scipy/io/matlab/streams.pyx \
 scipy/signal/spectral.pyx \
+scipy/sparse/csgraph/_min_spanning_tree.pyx \
+scipy/sparse/csgraph/parameters.pxi \
+scipy/sparse/csgraph/_shortest_path.pyx \
+scipy/sparse/csgraph/_tools.pyx \
+scipy/sparse/csgraph/_traversal.pyx \
 scipy/spatial/ckdtree.pyx \
 scipy/spatial/qhull.pxd \
 scipy/spatial/qhull.pyx \
 scipy/special/lambertw.pyx \
 scipy/special/orthogonal_eval.pyx \
+scipy/stats/_rank.pyx \
 scipy/stats/vonmises_cython.pyx; do
 echo $f
 (cd $DIR/$(dirname $f);\
 wget $SRC/$f)
 done
-# also needs a patch to the generator
-(cd $DIR/scipy/interpolate/;
-mv interpnd.pyx interpnd.pyx.in)
 
 # create tar ball
 GZIP=--best tar czf $TAR $DIR

Added: packages/scipy/trunk/debian/patches/BUG-fix-dependency-on-dict-ordering-in-test.patch
===================================================================
--- packages/scipy/trunk/debian/patches/BUG-fix-dependency-on-dict-ordering-in-test.patch	                        (rev 0)
+++ packages/scipy/trunk/debian/patches/BUG-fix-dependency-on-dict-ordering-in-test.patch	2013-01-27 16:52:45 UTC (rev 23402)
@@ -0,0 +1,55 @@
+From c91d47da9e9b03861a41b4bf24ceb96506c158ce Mon Sep 17 00:00:00 2001
+From: Matthew Brett <matthew.brett at gmail.com>
+Date: Mon, 22 Oct 2012 13:00:28 -0400
+Subject: [PATCH] BUG: fix dependency on dict ordering in test.
+
+Python 3.3 discovered the dependency on dict ordering
+---
+ scipy/io/matlab/tests/test_mio.py |   22 ++++++++++++++--------
+ 1 file changed, 14 insertions(+), 8 deletions(-)
+
+diff --git a/scipy/io/matlab/tests/test_mio.py b/scipy/io/matlab/tests/test_mio.py
+index c4f8f5b..9d246e0 100644
+--- a/scipy/io/matlab/tests/test_mio.py
++++ b/scipy/io/matlab/tests/test_mio.py
+@@ -516,23 +516,29 @@ def test_use_small_element():
+ 
+ def test_save_dict():
+     # Test that dict can be saved (as recarray), loaded as matstruct
+-    dict_types = (dict,)
++    dict_types = ((dict, False),)
+     try:
+         from collections import OrderedDict
+     except ImportError:
+         pass
+     else:
+-        dict_types += (OrderedDict,)
+-    exp_arr = np.zeros((1, 1), dtype = [('a', object), ('b', object)])
+-    exp_arr['a'] = 1
+-    exp_arr['b'] = 2
+-    for dict_type in dict_types:
++        dict_types += ((OrderedDict, True),)
++    ab_exp = np.array([[(1, 2)]], dtype=[('a', object), ('b', object)])
++    ba_exp = np.array([[(2, 1)]], dtype=[('b', object), ('a', object)])
++    for dict_type, is_ordered in dict_types:
+         d = dict_type(a=1, b=2)
+         stream = BytesIO()
+         savemat_future(stream, {'dict': d})
+         stream.seek(0)
+-        vals = loadmat(stream)
+-        assert_array_equal(vals['dict'], exp_arr)
++        vals = loadmat(stream)['dict']
++        assert_equal(set(vals.dtype.names), set(['a', 'b']))
++        if is_ordered: # Input was ordered, output in ab order
++            assert_array_equal(vals, ab_exp)
++        else: # Not ordered input, either order output
++            if vals.dtype.names[0] == 'a':
++                assert_array_equal(vals, ab_exp)
++            else:
++                assert_array_equal(vals, ba_exp)
+ 
+ 
+ def test_1d_shape():
+-- 
+1.7.10.4
+

Added: packages/scipy/trunk/debian/patches/BUG-remove-inline-statement-rejected-by-cython.patch
===================================================================
--- packages/scipy/trunk/debian/patches/BUG-remove-inline-statement-rejected-by-cython.patch	                        (rev 0)
+++ packages/scipy/trunk/debian/patches/BUG-remove-inline-statement-rejected-by-cython.patch	2013-01-27 16:52:45 UTC (rev 23402)
@@ -0,0 +1,46 @@
+From c0f0fa2a5bdf30f3a4d35fe78a1f9884d2e2896e Mon Sep 17 00:00:00 2001
+From: Matthew Brett <matthew.brett at gmail.com>
+Date: Sat, 20 Oct 2012 20:46:14 -0400
+Subject: [PATCH] BUG: remove inline statement rejected by cython
+
+Cython 0.17.1 rejects inline in the function definition for cpdef
+functions.
+---
+ scipy/io/matlab/mio5_utils.pyx |   10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/scipy/io/matlab/mio5_utils.pyx b/scipy/io/matlab/mio5_utils.pyx
+index 1604a61..21b1386 100644
+--- a/scipy/io/matlab/mio5_utils.pyx
++++ b/scipy/io/matlab/mio5_utils.pyx
+@@ -408,14 +408,14 @@ cdef class VarReader5:
+             if mod8:
+                 self.cstream.seek(8 - mod8, 1)
+         return 0
+-    
+-    cpdef inline cnp.ndarray read_numeric(self, int copy=True):
++
++    cpdef cnp.ndarray read_numeric(self, int copy=True):
+         ''' Read numeric data element into ndarray
+ 
+-        Reads element, then casts to ndarray. 
++        Reads element, then casts to ndarray.
+ 
+         The type of the array is given by the ``mdtype`` returned via
+-        ``read_element``. 
++        ``read_element``.
+         '''
+         cdef cnp.uint32_t mdtype, byte_count
+         cdef void *data_ptr
+@@ -440,7 +440,7 @@ cdef class VarReader5:
+         Py_INCREF(<object> data)
+         PyArray_Set_BASE(el, data)
+         return el
+-            
++
+     cdef inline object read_int8_string(self):
+         ''' Read, return int8 type string
+ 
+-- 
+1.7.10.4
+

Deleted: packages/scipy/trunk/debian/patches/interpnd-generator.patch
===================================================================
--- packages/scipy/trunk/debian/patches/interpnd-generator.patch	2013-01-25 21:03:36 UTC (rev 23401)
+++ packages/scipy/trunk/debian/patches/interpnd-generator.patch	2013-01-27 16:52:45 UTC (rev 23402)
@@ -1,40 +0,0 @@
-From 7d1ecbd42db21f0ca50ab23999756c34c1d77723 Mon Sep 17 00:00:00 2001 
-From: Pauli Virtanen <pav at iki.fi>
-Date: Sun, 4 Mar 2012 01:48:00 +0100
-Description: needed so we can regenerate the pyx file
-
----
- scipy/interpolate/generate_interpnd.py |   15 +++++++--------
- 1 file changed, 7 insertions(+), 8 deletions(-)
-
---- a/scipy/interpolate/generate_interpnd.py
-+++ b/scipy/interpolate/generate_interpnd.py
-@@ -8,21 +8,20 @@
- 
- from mako.template import Template
- 
--f = open('interpnd.pyx', 'r')
-+f = open('interpnd.pyx.in', 'r')
- template = f.read()
- f.close()
- 
-+# Run templating engine
-+f = open('interpnd.pyx', 'w')
-+f.write(Template(template).render())
-+f.close()
-+
- tmp_dir = tempfile.mkdtemp()
- try:
--    # Run templating engine
--    fn = os.path.join(tmp_dir, 'interpnd.pyx')
--    f = open(fn, 'w')
--    f.write(Template(template).render())
--    f.close()
--
-     # Run Cython
-     dst_fn = os.path.join(tmp_dir, 'interpnd.c')
--    ret = subprocess.call(['cython', '-I', '../..', '-o', dst_fn, fn])
-+    ret = subprocess.call(['cython', '-I', '../..', '-o', dst_fn, 'interpnd.pyx'])
-     if ret != 0:
-         sys.exit(ret)
- 

Modified: packages/scipy/trunk/debian/patches/series
===================================================================
--- packages/scipy/trunk/debian/patches/series	2013-01-25 21:03:36 UTC (rev 23401)
+++ packages/scipy/trunk/debian/patches/series	2013-01-27 16:52:45 UTC (rev 23402)
@@ -4,4 +4,5 @@
 restore_sys_argv.patch
 blitz++.patch
 up_minpack_ints.diff
-interpnd-generator.patch
+BUG-fix-dependency-on-dict-ordering-in-test.patch
+BUG-remove-inline-statement-rejected-by-cython.patch




More information about the Python-modules-commits mailing list