diff --git a/1000-numpy-anolis-support-loongarch64.patch b/1000-numpy-anolis-support-loongarch64.patch new file mode 100644 index 0000000000000000000000000000000000000000..358990016981e072731d1da20076f4778accee5c --- /dev/null +++ b/1000-numpy-anolis-support-loongarch64.patch @@ -0,0 +1,23 @@ +diff -Nurp numpy-1.17.3.orig/numpy/core/include/numpy/npy_cpu.h numpy-1.17.3/numpy/core/include/numpy/npy_cpu.h +--- numpy-1.17.3.orig/numpy/core/include/numpy/npy_cpu.h 2019-08-30 23:11:42.000000000 +0000 ++++ numpy-1.17.3/numpy/core/include/numpy/npy_cpu.h 2021-01-25 04:42:36.910156250 +0000 +@@ -102,6 +102,8 @@ + #define NPY_CPU_ARCEB + #elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64 + #define NPY_CPU_RISCV64 ++#elif defined(__loongarch64) ++ #define NPY_CPU_LOONGARCH64 + #else + #error Unknown CPU, please report this to numpy maintainers with \ + information about your platform (OS, CPU and compiler) +diff -Nurp numpy-1.17.3.orig/numpy/core/include/numpy/npy_endian.h numpy-1.17.3/numpy/core/include/numpy/npy_endian.h +--- numpy-1.17.3.orig/numpy/core/include/numpy/npy_endian.h 2019-08-30 23:11:42.000000000 +0000 ++++ numpy-1.17.3/numpy/core/include/numpy/npy_endian.h 2021-01-25 04:42:36.910156250 +0000 +@@ -48,6 +48,7 @@ + || defined(NPY_CPU_MIPSEL) \ + || defined(NPY_CPU_PPC64LE) \ + || defined(NPY_CPU_ARCEL) \ ++ || defined(NPY_CPU_LOONGARCH64) \ + || defined(NPY_CPU_RISCV64) + #define NPY_BYTE_ORDER NPY_LITTLE_ENDIAN + #elif defined(NPY_CPU_PPC) \ diff --git a/numpy.spec b/numpy.spec index 3e4a3434e99eb4cb9b71a337756f42fb14b54e53..32f41e574d7772ce805ca94e89a2f4a4d86c49b2 100644 --- a/numpy.spec +++ b/numpy.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 #uncomment next line for a release candidate or a beta #%%global relc rc1 @@ -8,7 +9,7 @@ Name: numpy Version: 1.17.3 -Release: 6%{?dist} +Release: 6%{anolis_release}%{?dist} Summary: A fast multidimensional array facility for Python # Everything is BSD except for class SafeEval in numpy/lib/utils.py which is Python @@ -19,6 +20,8 @@ Source1: https://docs.scipy.org/doc/numpy/numpy-html-1.17.0.zip # Upstream issue: https://github.com/numpy/numpy/issues/13173 Patch0: 0001-Remove-failing-test-from-linalg-module.patch +Patch1000: 1000-numpy-anolis-support-loongarch64.patch + # Exclude i686 arch. Due to a modularity issue it's being added to the # x86_64 compose of CRB, but we don't want to ship it at all. # See: https://projects.engineering.redhat.com/browse/RCM-72605 @@ -215,6 +218,9 @@ fi %changelog +* Thu Oct 20 2022 Liwei Ge - 1.17.3-6.0.1 +- Support loongarch64 platform + * Mon Aug 02 2021 Tomas Orsava - 1.17.3-6 - Adjusted the postun scriptlets to enable upgrading to RHEL 9 - Resolves: rhbz#1933055