forked from pool/python-nibabel
Accepting request 719705 from home:TheBlackCat:branches:devel:languages:python:numeric
Add fix_numpy_1_17.patch to fix building with numpy 1.17.0 OBS-URL: https://build.opensuse.org/request/show/719705 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-nibabel?expand=0&rev=3
This commit is contained in:
parent
1d3a2b5125
commit
ab3c891557
23
fix_numpy_1_17.patch
Normal file
23
fix_numpy_1_17.patch
Normal file
@ -0,0 +1,23 @@
|
||||
From 86b4fbedfb6919fab4e3ffe21536c5df2633c57b Mon Sep 17 00:00:00 2001
|
||||
From: "Christopher J. Markiewicz" <markiewicz@stanford.edu>
|
||||
Date: Sat, 15 Jun 2019 14:28:04 +0200
|
||||
Subject: [PATCH] FIX/TEST: Numpy casting rules have gotten more strict, raise
|
||||
different exception
|
||||
|
||||
---
|
||||
nibabel/tests/test_volumeutils.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/nibabel/tests/test_volumeutils.py b/nibabel/tests/test_volumeutils.py
|
||||
index 06df9eb6a..fcdc5c271 100644
|
||||
--- a/nibabel/tests/test_volumeutils.py
|
||||
+++ b/nibabel/tests/test_volumeutils.py
|
||||
@@ -700,7 +700,7 @@ def test_a2f_non_numeric():
|
||||
# Some versions of numpy can cast structured types to float, others not
|
||||
try:
|
||||
arr.astype(float)
|
||||
- except ValueError:
|
||||
+ except (TypeError, ValueError):
|
||||
pass
|
||||
else:
|
||||
back_arr = write_return(arr, fobj, float)
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 29 18:56:10 UTC 2019 - Todd R <toddrme2178@gmail.com>
|
||||
|
||||
- Add fix_numpy_1_17.patch to fix building with numpy 1.17.0
|
||||
From: gh#/nipy/nibabel#768
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 26 14:21:33 UTC 2019 - Todd R <toddrme2178@gmail.com>
|
||||
|
||||
|
@ -24,6 +24,8 @@ Summary: Tool to access multiple neuroimaging data formats
|
||||
Url: http://nipy.org/nibabel
|
||||
Group: Development/Languages/Python
|
||||
Source: https://files.pythonhosted.org/packages/source/n/nibabel/nibabel-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM fix_numpy_1_17.patch gh#/nipy/nibabel#768
|
||||
Patch1: fix_numpy_1_17.patch
|
||||
BuildRequires: %{python_module setuptools >= 30.3.0}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
@ -54,6 +56,7 @@ very limited support for DICOM.
|
||||
|
||||
%prep
|
||||
%setup -q -n nibabel-%{version}
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
Loading…
Reference in New Issue
Block a user