diff --git a/py2-tables-fix-for-aarch64.patch b/py2-tables-fix-for-aarch64.patch new file mode 100644 index 00000000000..6dfb8bb4da1 --- /dev/null +++ b/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' diff --git a/py2-tables.spec b/py2-tables.spec index 2b243a1e007..0c1b0364153 100644 --- a/py2-tables.spec +++ b/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}"