python3-numpy: update 1.21.4 -> 1.22.0

(From OE-Core rev: 6b9f2e078fb5653a1cedd64e90459e2f0780eb7e)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexander Kanavin
2022-01-09 23:27:24 +01:00
committed by Richard Purdie
parent a02cdb5674
commit 633b403b6d
3 changed files with 49 additions and 25 deletions

View File

@@ -1,4 +1,4 @@
From dbcf296f84e5cef6a3ff0f1c469a4508f1e0fb15 Mon Sep 17 00:00:00 2001
From eb6d6579150bf4684603ce377c51e90ad3bb8109 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sun, 15 Nov 2020 15:32:39 -0800
Subject: [PATCH] numpy/core: Define RISCV-32 support
@@ -8,39 +8,33 @@ Helps compile on riscv32
Upstream-Status: Submitted [https://github.com/numpy/numpy/pull/17780]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
numpy/core/include/numpy/npy_cpu.h | 9 +++++++--
numpy/core/include/numpy/npy_cpu.h | 3 +++
numpy/core/include/numpy/npy_endian.h | 1 +
2 files changed, 8 insertions(+), 2 deletions(-)
2 files changed, 4 insertions(+)
diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h
index 4dbf9d84e..bc41a7eda 100644
index 78d229e..04be511 100644
--- a/numpy/core/include/numpy/npy_cpu.h
+++ b/numpy/core/include/numpy/npy_cpu.h
@@ -18,6 +18,7 @@
* NPY_CPU_ARCEL
@@ -19,6 +19,7 @@
* NPY_CPU_ARCEB
* NPY_CPU_RISCV64
* NPY_CPU_LOONGARCH
+ * NPY_CPU_RISCV32
* NPY_CPU_WASM
*/
#ifndef _NPY_CPUARCH_H_
@@ -100,8 +101,12 @@
#define NPY_CPU_ARCEL
#elif defined(__arc__) && defined(__BIG_ENDIAN__)
#ifndef NUMPY_CORE_INCLUDE_NUMPY_NPY_CPU_H_
@@ -104,6 +105,8 @@
#define NPY_CPU_ARCEB
-#elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
- #define NPY_CPU_RISCV64
+#elif defined(__riscv)
+ #if __riscv_xlen == 64
+ #define NPY_CPU_RISCV64
+ #elif __riscv_xlen == 32
+ #define NPY_CPU_RISCV32
+ #endif
#elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
#define NPY_CPU_RISCV64
+#elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 32
+ #define NPY_CPU_RISCV32
#elif defined(__loongarch__)
#define NPY_CPU_LOONGARCH
#elif defined(__EMSCRIPTEN__)
/* __EMSCRIPTEN__ is defined by emscripten: an LLVM-to-Web compiler */
#define NPY_CPU_WASM
diff --git a/numpy/core/include/numpy/npy_endian.h b/numpy/core/include/numpy/npy_endian.h
index aa367a002..d59484573 100644
index 5e58a7f..0926212 100644
--- a/numpy/core/include/numpy/npy_endian.h
+++ b/numpy/core/include/numpy/npy_endian.h
@@ -49,6 +49,7 @@
@@ -48,9 +42,9 @@ index aa367a002..d59484573 100644
|| defined(NPY_CPU_ARCEL) \
|| defined(NPY_CPU_RISCV64) \
+ || defined(NPY_CPU_RISCV32) \
|| defined(NPY_CPU_LOONGARCH) \
|| defined(NPY_CPU_WASM)
#define NPY_BYTE_ORDER NPY_LITTLE_ENDIAN
#elif defined(NPY_CPU_PPC) \
--
2.29.2
2.20.1

View File

@@ -0,0 +1,29 @@
From 0f0601e79f9ce7614d157284523e6cd8af2259d5 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex@linutronix.de>
Date: Wed, 5 Jan 2022 12:12:47 +0100
Subject: [PATCH] numpy/core/setup.py: disable svml for now
The check really doesn't work in cross compiling,
as it is using host python to see what arch we're
building on. Issue reported upstream:
https://github.com/numpy/numpy/issues/20736
Upstream-Status: Inappropriate [needs upstream fix]
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
numpy/core/setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/numpy/core/setup.py b/numpy/core/setup.py
index a5f423d..945f2dd 100644
--- a/numpy/core/setup.py
+++ b/numpy/core/setup.py
@@ -70,7 +70,7 @@ def can_link_svml():
"""
machine = platform.machine()
system = platform.system()
- return "x86_64" in machine and system == "Linux"
+ return False
def check_svml_submodule(svmlpath):
if not os.path.exists(svmlpath + "/README.md"):