[numexpr] 01/02: Fix compatibility with numpy 1.12

Antonio Valentino a_valentino-guest at moszumanska.debian.org
Sat Jan 28 10:52:30 UTC 2017


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

a_valentino-guest pushed a commit to branch master
in repository numexpr.

commit 2cddb4a33ace65abc3aa893534d8abf0cdd75d72
Author: Antonio Valentino <antonio.valentino at tiscali.it>
Date:   Sat Jan 28 10:31:47 2017 +0000

    Fix compatibility with numpy 1.12
---
 debian/changelog                                   | 8 ++++++++
 debian/patches/0002-numpy-1.12-compatibility.patch | 8 ++++----
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 966fa8e..0b4e0f6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+numexpr (2.6.1-4) UNRELEASED; urgency=medium
+
+  * debian/patches
+    - better version parsing in 0002-numpy-1.12-compatibility.patch.
+      Fix compatibility with numpy 1.12 (Closes: #852906)
+
+ -- Antonio Valentino <antonio.valentino at tiscali.it>  Sat, 28 Jan 2017 10:29:35 +0000
+
 numexpr (2.6.1-3) unstable; urgency=high
 
   * debian/patches
diff --git a/debian/patches/0002-numpy-1.12-compatibility.patch b/debian/patches/0002-numpy-1.12-compatibility.patch
index 60252c0..bd653ae 100644
--- a/debian/patches/0002-numpy-1.12-compatibility.patch
+++ b/debian/patches/0002-numpy-1.12-compatibility.patch
@@ -8,15 +8,15 @@ Subject: numpy 1.12 compatibility
  2 files changed, 43 insertions(+), 12 deletions(-)
 
 diff --git a/numexpr/expressions.py b/numexpr/expressions.py
-index 1bb2a80..2c77563 100644
+index 1bb2a80..b8261cf 100644
 --- a/numexpr/expressions.py
 +++ b/numexpr/expressions.py
 @@ -15,6 +15,8 @@ import sys
  import threading
  
  import numpy
-+from distutils.version import LooseVersion
-+_np_version = LooseVersion(numpy.__version__)
++from pkg_resources import parse_version
++_np_version = parse_version(numpy.__version__)
  
  # Declare a double type that does not exist in Python space
  double = numpy.double
@@ -24,7 +24,7 @@ index 1bb2a80..2c77563 100644
  
  @ophelper
  def pow_op(a, b):
-+    if (_np_version >= '1.12.0b1' and
++    if (_np_version >= parse_version('1.12.0b1') and
 +        b.astKind in ('int', 'long') and
 +        a.astKind in ('int', 'long') and
 +        numpy.any(b.value < 0)):

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



More information about the debian-science-commits mailing list