Hello community,

here is the log from the commit of package python3-blosc for openSUSE:Factory 
checked in at 2017-01-31 12:46:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-blosc (Old)
 and      /work/SRC/openSUSE:Factory/.python3-blosc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python3-blosc"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-blosc/python3-blosc.changes      
2016-09-12 13:27:24.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python3-blosc.new/python3-blosc.changes 
2017-02-03 18:58:51.561219948 +0100
@@ -1,0 +2,6 @@
+Fri Jan  6 08:33:52 UTC 2017 - norm...@linux.vnet.ibm.com
+
+- new blosc-setup.py-gracefuly-handle-cpuinfo-failure.patch
+  to ignore cpuinfo failure (at least required for PowerPC)
+
+-------------------------------------------------------------------

New:
----
  blosc-setup.py-gracefuly-handle-cpuinfo-failure.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python3-blosc.spec ++++++
--- /var/tmp/diff_new_pack.Nx5wXi/_old  2017-02-03 18:58:51.929168270 +0100
+++ /var/tmp/diff_new_pack.Nx5wXi/_new  2017-02-03 18:58:51.933167708 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python3-blosc
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -32,6 +32,7 @@
 Requires:       blosc-devel
 Requires:       python3-numpy
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+Patch1:         blosc-setup.py-gracefuly-handle-cpuinfo-failure.patch
 
 %description
 Blosc is a high performance compressor optimized for binary data in
@@ -39,6 +40,7 @@
 
 %prep
 %setup -q -n blosc-%{version}
+%patch1 -p1
 
 %build
 CFLAGS="%{optflags}" python3 setup.py build_ext --inplace --blosc=%{_prefix}

++++++ blosc-setup.py-gracefuly-handle-cpuinfo-failure.patch ++++++
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbys...@in.waw.pl>
Date: Fri, 23 Sep 2016 21:25:19 -0400
Subject: [PATCH] setup.py: gracefuly handle cpuinfo failure

When comping on aarch64, setup.py fails with:
Exception: py-cpuinfo currently only works on X86 and some ARM CPUs.
Assume that the CPU does not support SSE2 or AVX in importing cpuinfo fails
and continue.
---
 setup.py |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

Index: python-blosc-1.4.1/setup.py
===================================================================
--- python-blosc-1.4.1.orig/setup.py
+++ python-blosc-1.4.1/setup.py
@@ -19,7 +19,13 @@ import sys
 from setuptools import Extension
 from setuptools import setup
 from glob import glob
-import cpuinfo
+try:
+    import cpuinfo
+    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 = []
 
 ########### Check versions ##########
 
@@ -94,9 +100,8 @@ else:
     def_macros += [('HAVE_LZ4', 1), ('HAVE_SNAPPY', 1), ('HAVE_ZLIB', 1), 
('HAVE_ZSTD', 1)]
 
     # Guess SSE2 or AVX2 capabilities
-    cpu_info = cpuinfo.get_cpu_info()
     # SSE2
-    if 'sse2' in cpu_info['flags']:
+    if 'sse2' in cpu_flags:
         print('SSE2 detected')
         CFLAGS.append('-DSHUFFLE_SSE2_ENABLED')
         sources += [f for f in glob('c-blosc/blosc/*.c') if 'sse2' in f]
@@ -105,7 +110,7 @@ else:
         elif os.name == 'nt':
             def_macros += [('__SSE2__', 1)]
     # AVX2
-    if 'avx2' in cpu_info['flags']:
+    if 'avx2' in cpu_flags:
         print('AVX2 detected')
         CFLAGS.append('-DSHUFFLE_AVX2_ENABLED')
         sources += [f for f in glob('c-blosc/blosc/*.c') if 'avx2' in f]

Reply via email to