Skip to content

Commit

Permalink
Merge pull request #2868 from cms-sw/py2-tables-fix-for-aarch64
Browse files Browse the repository at this point in the history
applied py2-tables-fix-for-aarch64 patch to disable cpu checking to enable sse2/avx2
  • Loading branch information
smuzaffar committed Feb 28, 2017
2 parents 4728775 + e2ca0ee commit 20e6fc7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
15 changes: 15 additions & 0 deletions py2-tables-fix-for-aarch64.patch
@@ -0,0 +1,15 @@
diff --git a/setup.py b/setup.py
index 6b64a57..4681b14 100755
--- a/setup.py
+++ b/setup.py
@@ -32,8 +32,8 @@ import distutils.spawn
from setuptools.command.build_ext import build_ext

# For guessing the capabilities of the CPU for C-Blosc
-import cpuinfo
-cpu_info = cpuinfo.get_cpu_info()
+#import cpuinfo
+cpu_info = { 'flags' : [] } #to avoid compiling avx2 and make it run for aarch64

# The name for the pkg-config utility
PKG_CONFIG = 'pkg-config'
4 changes: 2 additions & 2 deletions py2-tables.spec
@@ -1,10 +1,10 @@
### RPM external py2-tables 3.3.0
## INITENV +PATH PYTHONPATH %{i}/$PYTHON_LIB_SITE_PACKAGES

Patch0: py2-tables-fix-for-aarch64
%define pip_name tables
Requires: py2-numexpr py2-six py2-numpy hdf5 bz2lib

%define PipPreBuild export HDF5_DIR=${HDF5_ROOT}
%define PipPreBuild export HDF5_DIR=${HDF5_ROOT} && tar -xzf tables-%{realversion}.tar.gz && pushd tables-%{realversion} && for pch in %{patches} ; do patch -p1 < ${pch} ; done && popd && rm -f tables-%{realversion}.tar.gz && tar czf tables-%{realversion}.tar.gz tables-%{realversion}

%define PipBuildOptions --global-option="--hdf5=${HDF5_ROOT}" --global-option="--bzip2=${BZ2LIB_ROOT}"

Expand Down

0 comments on commit 20e6fc7

Please sign in to comment.