[pytables] 01/01: Improved 0005-Ignore-cpuinfo-on-unsupported-archs.patch

Antonio Valentino a_valentino-guest at moszumanska.debian.org
Tue Nov 1 21:38:50 UTC 2016


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

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

commit 8239f5e9867a63618e2bebe70e0a3a434b909ce6
Author: Antonio Valentino <antonio.valentino at tiscali.it>
Date:   Tue Nov 1 22:01:44 2016 +0100

    Improved 0005-Ignore-cpuinfo-on-unsupported-archs.patch
    
    Ignore any kind of error from cpuinfo
---
 debian/changelog                                   |  8 +++++
 .../0005-Ignore-cpuinfo-on-unsupported-archs.patch | 35 +++++++++++++++++-----
 2 files changed, 35 insertions(+), 8 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 8543c76..2208f79 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+pytables (3.3.0-3) unstable; urgency=medium
+
+  * debian/patches
+    - improved 0005-Ignore-cpuinfo-on-unsupported-archs.patch to ignore
+      any kind of error from cpuinfo
+
+ -- Antonio Valentino <antonio.valentino at tiscali.it>  Tue, 01 Nov 2016 21:35:06 +0000
+
 pytables (3.3.0-2) unstable; urgency=medium
 
   * debian/patches
diff --git a/debian/patches/0005-Ignore-cpuinfo-on-unsupported-archs.patch b/debian/patches/0005-Ignore-cpuinfo-on-unsupported-archs.patch
index 7579676..1be035e 100644
--- a/debian/patches/0005-Ignore-cpuinfo-on-unsupported-archs.patch
+++ b/debian/patches/0005-Ignore-cpuinfo-on-unsupported-archs.patch
@@ -1,16 +1,16 @@
 From: Antonio Valentino <antonio.valentino at tiscali.it>
 Date: Tue, 1 Nov 2016 08:04:42 +0000
-Subject: Ignore cpuinfo on unsupported archs
+Subject: Ignore cpuinfo errors
 
 ---
- setup.py | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
+ setup.py | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
 
 diff --git a/setup.py b/setup.py
-index fe2492e..e891926 100755
+index fe2492e..15c170a 100755
 --- a/setup.py
 +++ b/setup.py
-@@ -32,8 +32,12 @@ import distutils.spawn
+@@ -32,8 +32,13 @@ import distutils.spawn
  from setuptools.command.build_ext import build_ext
  
  # For guessing the capabilities of the CPU for C-Blosc
@@ -18,10 +18,29 @@ index fe2492e..e891926 100755
 -cpu_info = cpuinfo.get_cpu_info()
 +try:
 +    import cpuinfo
-+except ImportError:
-+    cpu_info = dict(flags=[])
-+else:
 +    cpu_info = cpuinfo.get_cpu_info()
++    cpu_flags = cpu_info['flags']
++except Exception as e:
++    print('cpuinfo failed, assuming no CPU features:', e)
++    cpu_flags = []
  
  # The name for the pkg-config utility
  PKG_CONFIG = 'pkg-config'
+@@ -808,7 +813,7 @@ if 'BLOSC' not in optional_libs:
+             os.remove(fd.name)
+ 
+     # SSE2
+-    if False and ('sse2' in cpu_info['flags']):
++    if False and ('sse2' in cpu_flags):
+         print('SSE2 detected')
+         CFLAGS.append('-DSHUFFLE_SSE2_ENABLED')
+         if os.name == 'nt':
+@@ -822,7 +827,7 @@ if 'BLOSC' not in optional_libs:
+                           if 'sse2' in f]
+     # AVX2
+     # Detection code for AVX2 only works for gcc/clang, not for MSVC yet
+-    if False and ('avx2' in cpu_info['flags'] and
++    if False and ('avx2' in cpu_flags and
+             compiler_has_flags(compiler, ["-mavx2"])):
+         print('AVX2 detected')
+         CFLAGS.append('-DSHUFFLE_AVX2_ENABLED')

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



More information about the debian-science-commits mailing list