From 29d9dd805b3318b476b616c2a403701f16c0a79c Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Sep 25 2023 17:04:00 +0000 Subject: Update to a current snapshot (6823b5a) --- diff --git a/.gitignore b/.gitignore index 2caa0d7..d4d091e 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /nipy-27da5902fb7aae18961c2c8dca7c4317f94ecb16.tar.gz /nipy-5694194165c2533d40c88df94e820194016d4841.tar.gz /nipy-46eff4cb6d425b5a47d17a8ab4ad87e708035028.tar.gz +/nipy-6823b5a4dac94371c5bb880eacaf09a993562cc5.tar.gz diff --git a/0001-Downstream-only-allow-numpy-1.24.patch b/0001-Downstream-only-allow-numpy-1.24.patch new file mode 100644 index 0000000..222550b --- /dev/null +++ b/0001-Downstream-only-allow-numpy-1.24.patch @@ -0,0 +1,30 @@ +From 6fbdf145c4b08134e6ae118e10f5f0243bca941c Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Thu, 21 Sep 2023 13:53:48 -0400 +Subject: [PATCH] Downstream-only: allow numpy 1.24 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream’s version bound is chosen for binary compatibility, which is +much more tightly controlled in a distribution package +--- + pyproject.toml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pyproject.toml b/pyproject.toml +index 3d818f76..ef93c8a0 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -3,7 +3,7 @@ requires = [ + "setuptools", + "cython<3", + # Newer than NEP29-minimum: compile against oldest numpy available +- "numpy>=1.25; python_version > '3.8'", ++ "numpy>=1.24; python_version > '3.8'", + # NEP29-minimum as of Sep 21, 2023 + "numpy==1.22; python_version >= '3.7' and python_version < '3.9'", + ] +-- +2.41.0 + diff --git a/515.patch b/515.patch deleted file mode 100644 index 9515db9..0000000 --- a/515.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 3bdd39049ac391cbd8a0a629797ca0630384b8d7 Mon Sep 17 00:00:00 2001 -From: "Benjamin A. Beasley" -Date: Thu, 21 Sep 2023 12:05:06 -0400 -Subject: [PATCH] Replace deprecated/removed matplotlib.cm.LUTSIZE - -Ref: https://github.com/matplotlib/matplotlib/pull/20806/ ---- - nipy/labs/viz_tools/cm.py | 13 +++++++------ - 1 file changed, 7 insertions(+), 6 deletions(-) - -diff --git a/nipy/labs/viz_tools/cm.py b/nipy/labs/viz_tools/cm.py -index 69528ac72..3848f7d8f 100644 ---- a/nipy/labs/viz_tools/cm.py -+++ b/nipy/labs/viz_tools/cm.py -@@ -11,6 +11,7 @@ - try: - from matplotlib import cm as _cm - from matplotlib import colors as _colors -+ from matplotlib import rcParams as _rc - except ImportError: - skip_if_running_nose('Could not import matplotlib') - -@@ -109,7 +110,7 @@ def alpha_cmap(color, name=''): - (red, green, blue, 1.), - ] - cmap = _colors.LinearSegmentedColormap.from_list( -- '%s_transparent' % name, cmapspec, _cm.LUTSIZE) -+ '%s_transparent' % name, cmapspec, _rc['image.lut']) - cmap._init() - cmap._lut[:, -1] = _np.linspace(.5, 1.0, cmap._lut.shape[0]) - cmap._lut[-1, -1] = 0 -@@ -159,7 +160,7 @@ def alpha_cmap(color, name=''): - _cmapspec = _cmaps_data[_cmapname] - if 'red' in _cmapspec: - _cmap_d[_cmapname] = _colors.LinearSegmentedColormap( -- _cmapname, _cmapspec, _cm.LUTSIZE) -+ _cmapname, _cmapspec, _rc['image.lut']) - _cmap_d[_cmapname_r] = _cmap_d[_cmapname].reversed(name=_cmapname_r) - else: - _revspec = list(reversed(_cmapspec)) -@@ -167,9 +168,9 @@ def alpha_cmap(color, name=''): - _revspec = [(1.0 - a, b) for a, b in _revspec] - - _cmap_d[_cmapname] = _colors.LinearSegmentedColormap.from_list( -- _cmapname, _cmapspec, _cm.LUTSIZE) -+ _cmapname, _cmapspec, _rc['image.lut']) - _cmap_d[_cmapname_r] = _colors.LinearSegmentedColormap.from_list( -- _cmapname_r, _revspec, _cm.LUTSIZE) -+ _cmapname_r, _revspec, _rc['image.lut']) - - ################################################################################ - # A few transparent colormaps -@@ -207,7 +208,7 @@ def dim_cmap(cmap, factor=.3, to_white=True): - return _colors.LinearSegmentedColormap( - '%s_dimmed' % cmap.name, - cdict, -- _cm.LUTSIZE) -+ _rc['image.lut']) - - - def replace_inside(outer_cmap, inner_cmap, vmin, vmax): -@@ -267,6 +268,6 @@ def replace_inside(outer_cmap, inner_cmap, vmin, vmax): - return _colors.LinearSegmentedColormap( - '%s_inside_%s' % (inner_cmap.name, outer_cmap.name), - cdict, -- _cm.LUTSIZE) -+ _rc['image.lut']) - - diff --git a/python-nipy.spec b/python-nipy.spec index 90f041a..966b9f4 100644 --- a/python-nipy.spec +++ b/python-nipy.spec @@ -10,7 +10,7 @@ # https://github.com/nipy/nipy/pull/503#issuecomment-1421508175 %bcond_with doc_pdf -%global commit 46eff4cb6d425b5a47d17a8ab4ad87e708035028 +%global commit 6823b5a4dac94371c5bb880eacaf09a993562cc5 %global snapdate 20230921 Name: python-nipy @@ -30,15 +30,17 @@ Source12: nipy_4dto3d.1 Source13: nipy_diagnose.1 Source14: nipy_tsdiffana.1 +# Downstream-only: allow numpy 1.24 +# +# Upstream’s version bound is chosen for binary compatibility, which is +# much more tightly controlled in a distribution package +Patch: 0001-Downstream-only-allow-numpy-1.24.patch # Account for nibabel 5.0.0 removal of .py3k shim - use numpy.compat.py3k # https://github.com/nipy/nipy/pull/512 Patch: https://github.com/nipy/nipy/pull/512.patch # Fix test creating unsupported double-precision GiftiDataArray # https://github.com/nipy/nipy/pull/514 Patch: https://github.com/nipy/nipy/pull/514.patch -# Replace deprecated/removed matplotlib.cm.LUTSIZE -# https://github.com/nipy/nipy/pull/515 -Patch: https://github.com/nipy/nipy/pull/515.patch BuildRequires: gcc BuildRequires: flexiblas-devel @@ -47,14 +49,6 @@ BuildRequires: python3-devel BuildRequires: python3dist(setuptools) # Imported in setup.py BuildRequires: python3dist(numpy) -#BuildRequires: python3dist(six) - -# For re-generating C code as required by packaging guidelines; see also -# nipy/nipy/info.py. -# -# Fails to build with Cython 3.0.2 -# https://github.com/nipy/nipy/issues/508 -BuildRequires: ((python3dist(cython) >= 0.12.1) with (python3dist(cython) < 3~~)) # A weak dependency; may enable more tests BuildRequires: python3dist(matplotlib) diff --git a/sources b/sources index 9ac775f..0197031 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (nipy-46eff4cb6d425b5a47d17a8ab4ad87e708035028.tar.gz) = 93ac516c829576b1ec6b25b501e4c21c7f1c400384f863aa22019343fae44db7730c4413b6d9d5983c001630dce33a37caf7951132d656112da00a7465b687d4 +SHA512 (nipy-6823b5a4dac94371c5bb880eacaf09a993562cc5.tar.gz) = 595186edfefb0decfbf7f39c94ad030a774a3ef67d23c403344a91ed865d2d685a14b98ed7c89827ec4682fa27bbf6b73d59e3d8ab0d3660c5bd15fc506dc278