[ismrmrd] 207/281: restore compatibility with numpy 1.6

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Wed Jan 14 20:01:15 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to annotated tag ismrmrd0.5
in repository ismrmrd.

commit 6e07c3ad5ef4f972f16b20999d931b60e05dfd53
Author: Ghislain Vaillant <ghisvail at gmail.com>
Date:   Fri Feb 28 11:09:04 2014 +0000

    restore compatibility with numpy 1.6
---
 bindings/CMakeLists.txt          | 6 +-----
 bindings/python/ismrmrd_python.i | 5 ++++-
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/bindings/CMakeLists.txt b/bindings/CMakeLists.txt
index e3ef242..3b31948 100644
--- a/bindings/CMakeLists.txt
+++ b/bindings/CMakeLists.txt
@@ -8,11 +8,7 @@ if(SWIG_FOUND)
     if(PYTHONLIBS_FOUND)
         find_package(NumPy)
         if(NUMPY_FOUND)
-            if (NUMPY_VERSION VERSION_LESS "1.7")
-                message("NumPy version < 1.7. Not building Python bindings")
-            else (${NUMPY_VERSION} VERSION_LESS "1.7")
-                add_subdirectory(python)
-            endif (NUMPY_VERSION VERSION_LESS "1.7")
+            add_subdirectory(python)
         else(NUMPY_FOUND)
             message("NumPy not found. Not building Python bindings")
         endif(NUMPY_FOUND)
diff --git a/bindings/python/ismrmrd_python.i b/bindings/python/ismrmrd_python.i
index e577e81..6c784e8 100644
--- a/bindings/python/ismrmrd_python.i
+++ b/bindings/python/ismrmrd_python.i
@@ -2,7 +2,10 @@
 
 %{
 
-#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
+// for compatibility with Numpy version <= 1.6
+#if NPY_FEATURE_VERSION < 0x00000007
+#define NPY_ARRAY_FARRAY NPY_FARRAY
+#endif
 
 #include "ismrmrd_hdf5.h"
 #include "numpy/arrayobject.h"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ismrmrd.git



More information about the debian-science-commits mailing list