[med-svn] [Git][med-team/nipy][master] 3 commits: Add patch to fix FTBFS (Closes: #1026484)

Nilesh Patra (@nilesh) gitlab at salsa.debian.org
Wed Dec 21 14:23:26 GMT 2022



Nilesh Patra pushed to branch master at Debian Med / nipy


Commits:
dc838bae by Nilesh Patra at 2022-12-21T19:37:54+05:30
Add patch to fix FTBFS (Closes: #1026484)

- - - - -
7a91fe43 by Nilesh Patra at 2022-12-21T19:37:54+05:30
Bump SV to 4.6.2

- - - - -
31a09ea3 by Nilesh Patra at 2022-12-21T19:37:54+05:30
Upload to unstable

- - - - -


6 changed files:

- debian/changelog
- debian/control
- debian/patches/local-mathjax.patch
- + debian/patches/numpy-fix.patch
- debian/patches/series
- debian/patches/sphinx-ext


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+nipy (0.5.0-4) unstable; urgency=medium
+
+  * Team Upload.
+  * Add patch to fix FTBFS (Closes: #1026484)
+  * Bump SV to 4.6.2
+
+ -- Nilesh Patra <nilesh at debian.org>  Wed, 21 Dec 2022 19:11:34 +0530
+
 nipy (0.5.0-3) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/control
=====================================
@@ -26,7 +26,7 @@ Build-Depends: debhelper-compat (= 13),
                graphviz,
                dvipng,
                help2man
-Standards-Version: 4.6.1
+Standards-Version: 4.6.2
 Vcs-Browser: https://salsa.debian.org/med-team/nipy
 Vcs-Git: https://salsa.debian.org/med-team/nipy.git
 Homepage: https://nipy.org/nipy/


=====================================
debian/patches/local-mathjax.patch
=====================================
@@ -2,9 +2,9 @@ Author: Stuart Prescott <stuart at debian.org>
 Description: Use mathjax package
 Forwarded: not-needed
 Last-Updated: 2020-01-31
---- nipy.orig/doc/conf.py
-+++ nipy/doc/conf.py
-@@ -240,3 +240,5 @@
+--- a/doc/conf.py
++++ b/doc/conf.py
+@@ -241,3 +241,5 @@
  # https://github.com/scikit-image/scikit-image/pull/1356
  numpydoc_show_class_members = False
  numpydoc_class_members_toctree = False


=====================================
debian/patches/numpy-fix.patch
=====================================
@@ -0,0 +1,137 @@
+Description: Adapt with newer numpy and nibabel
+Author: Nilesh Patra <nilesh at debian.org>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1026484
+Forwarded: NO
+Last-Update: 2022-12-21
+--- a/nipy/algorithms/diagnostics/tests/test_commands.py
++++ b/nipy/algorithms/diagnostics/tests/test_commands.py
+@@ -67,7 +67,7 @@
+             # default if input slice_axis is None
+             if hasattr(hdr, 'set_dim_info'):
+                 for ax_no in range(3):
+-                    nibabel_img.get_header().set_dim_info(slice=ax_no)
++                    nibabel_img.header.set_dim_info(slice=ax_no)
+                     nib.save(nibabel_img, fname)
+                     img, time_axis, slice_axis = parse_fname_axes(fname,
+                                                                   None,
+--- a/nipy/algorithms/statistics/formula/tests/test_formula.py
++++ b/nipy/algorithms/statistics/formula/tests/test_formula.py
+@@ -510,7 +510,7 @@
+         ndt = np.dtype(nt)
+         for lt in 'S3', 'U3', 'O':
+             ldt = np.dtype(lt)
+-            name = np.asscalar(np.array('foo', ndt))
+-            level = np.asscalar(np.array('bar', ldt))
++            name = np.asarray(np.array('foo', ndt)).item()
++            level = np.asarray(np.array('bar', ldt)).item()
+             ft = F.FactorTerm(name, level)
+             assert_equal(str(ft), 'foo_bar')
+--- a/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py
++++ b/nipy/algorithms/statistics/tests/test_intrinsic_volumes.py
+@@ -31,8 +31,8 @@
+     sl = []
+     for i in range(len(shape)):
+         sl.append(slice(edges[i][0], edges[i][1],1))
+-    data[sl] = 1
+-    return data.astype(np.int)
++    data[tuple(sl)] = 1
++    return data.astype(np.int64)
+ 
+ 
+ def randombox(shape):
+--- a/nipy/algorithms/kernel_smooth.py
++++ b/nipy/algorithms/kernel_smooth.py
+@@ -75,7 +75,7 @@
+             (np.asarray(self.bshape) + np.asarray(kernel.shape)) / 2)
+             * 2 + 2).astype(np.intp)
+         self.fkernel = np.zeros(self.shape)
+-        slices = [slice(0, kernel.shape[i]) for i in range(len(kernel.shape))]
++        slices = tuple([slice(0, kernel.shape[i]) for i in range(len(kernel.shape))])
+         self.fkernel[slices] = kernel
+         self.fkernel = fft.rfftn(self.fkernel)
+         return kernel
+@@ -181,9 +181,9 @@
+                 _out = data
+             _slice += 1
+         gc.collect()
+-        _out = _out[[slice(self._kernel.shape[i] // 2,
++        _out = _out[tuple([slice(self._kernel.shape[i] // 2,
+                            self.bshape[i] + self._kernel.shape[i] // 2)
+-                     for i in range(len(self.bshape))]]
++                     for i in range(len(self.bshape))])]
+         if inimage.ndim == 3:
+             return Image(_out, coordmap=self.coordmap)
+         else:
+@@ -194,7 +194,7 @@
+     def _presmooth(self, indata):
+         slices = [slice(0, self.bshape[i], 1) for i in range(len(self.shape))]
+         _buffer = np.zeros(self.shape)
+-        _buffer[slices] = indata
++        _buffer[tuple(slices)] = indata
+         return fft.rfftn(_buffer)
+ 
+ 
+@@ -258,7 +258,7 @@
+         m = [I[i].min() for i in range(n)]
+         M = [I[i].max() for i in range(n)]
+         slices = [slice(m[i], M[i]+1, 1) for i in range(n)]
+-        return X[slices]
++        return X[tuple(slices)]
+     else:
+         return np.zeros((1,)*n)
+ 
+--- a/nipy/algorithms/utils/tests/test_pca_image.py
++++ b/nipy/algorithms/utils/tests/test_pca_image.py
+@@ -274,7 +274,7 @@
+     new_axes = [None] * bps.ndim
+     n_comps = bps.shape[axis]
+     new_axes[axis] = slice(0, n_comps)
+-    res['basis_projections'] = Image(bps * signs[new_axes],
++    res['basis_projections'] = Image(bps * signs[tuple(new_axes)],
+                                      bps_img.coordmap)
+     return res
+ 
+--- a/nipy/core/utils/generators.py
++++ b/nipy/core/utils/generators.py
+@@ -139,6 +139,8 @@
+            [ 3.,  4.]])
+     """
+     for index, data in iterable:
++        if isinstance(index, list):
++            index = tuple(index)
+         output[index] = data
+ 
+ 
+@@ -190,7 +192,7 @@
+         for (a, div, mod) in zip(axis, divs, mods):
+             x = int(n / div % mod)
+             slices[a] = x
+-        yield slices, data[slices]
++        yield slices, data[tuple(slices)]
+ 
+ 
+ def f_generator(f, iterable):
+--- a/nipy/algorithms/registration/groupwise_registration.py
++++ b/nipy/algorithms/registration/groupwise_registration.py
+@@ -68,8 +68,8 @@
+ 
+ 
+ def make_grid(dims, subsampling=(1, 1, 1), borders=(0, 0, 0)):
+-    slices = [slice(b, d - b, s)\
+-                  for d, s, b in zip(dims, subsampling, borders)]
++    slices = tuple([slice(b, d - b, s)\
++                  for d, s, b in zip(dims, subsampling, borders)])
+     xyz = np.mgrid[slices]
+     xyz = np.rollaxis(xyz, 0, 4)
+     xyz = np.reshape(xyz, [np.prod(xyz.shape[0:-1]), 3])
+--- a/nipy/core/image/tests/test_image.py
++++ b/nipy/core/image/tests/test_image.py
+@@ -290,7 +290,7 @@
+         slicer = [slice(None) for i in range(data.ndim)]
+         for i, s in enumerate(iter_axis(img, ax_id, asarray=True)):
+             slicer[ax_no] = i
+-            assert_array_equal(s, data[slicer])
++            assert_array_equal(s, data[tuple(slicer)])
+ 
+ 
+ def test_rollaxis():


=====================================
debian/patches/series
=====================================
@@ -1,2 +1,3 @@
 sphinx-ext
 local-mathjax.patch
+numpy-fix.patch


=====================================
debian/patches/sphinx-ext
=====================================
@@ -1,6 +1,6 @@
 Forwarded: https://github.com/nipy/nipy/pull/485
---- nipy.orig/doc/conf.py
-+++ nipy/doc/conf.py
+--- a/doc/conf.py
++++ b/doc/conf.py
 @@ -16,6 +16,7 @@
  from importlib import import_module
  
@@ -9,8 +9,8 @@ Forwarded: https://github.com/nipy/nipy/pull/485
  
  # Doc generation depends on being able to import project
  project = 'nipy'
---- nipy.orig/nipy/tests/scriptrunner.py
-+++ nipy/nipy/tests/scriptrunner.py
+--- a/nipy/tests/scriptrunner.py
++++ b/nipy/tests/scriptrunner.py
 @@ -146,6 +146,8 @@
                  env['PYTHONPATH'] = self.local_module_dir
              else:



View it on GitLab: https://salsa.debian.org/med-team/nipy/-/compare/901c54086bd836501a72404bfc203e995fe4f353...31a09ea3fc0f695df6bac814081ec16cd48b546c

-- 
View it on GitLab: https://salsa.debian.org/med-team/nipy/-/compare/901c54086bd836501a72404bfc203e995fe4f353...31a09ea3fc0f695df6bac814081ec16cd48b546c
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20221221/27040661/attachment-0001.htm>


More information about the debian-med-commit mailing list