summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/python/python3-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch7
-rw-r--r--meta/recipes-devtools/python/python3-numpy/0001-numpy-core-Define-RISCV-32-support.patch58
-rw-r--r--meta/recipes-devtools/python/python3-numpy/fix_reproducibility.patch23
-rw-r--r--meta/recipes-devtools/python/python3-numpy_2.2.1.bb (renamed from meta/recipes-devtools/python/python3-numpy_2.1.3.bb)5
4 files changed, 21 insertions, 72 deletions
diff --git a/meta/recipes-devtools/python/python3-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch b/meta/recipes-devtools/python/python3-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
index bbe309c556..4a67308106 100644
--- a/meta/recipes-devtools/python/python3-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
+++ b/meta/recipes-devtools/python/python3-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
@@ -1,4 +1,4 @@
1From 46eea664cf89d0602e7ff16d587c37c045b125b7 Mon Sep 17 00:00:00 2001 1From 16a973c118989674afeeda2c2ccc24c9c366210e Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 10 Dec 2015 13:20:30 +0200 3Date: Thu, 10 Dec 2015 13:20:30 +0200
4Subject: [PATCH] Don't search /usr and so on for libraries by default to 4Subject: [PATCH] Don't search /usr and so on for libraries by default to
@@ -8,16 +8,15 @@ Subject: [PATCH] Don't search /usr and so on for libraries by default to
8Upstream-Status: Inappropriate (As the code stands, this is a hack) 8Upstream-Status: Inappropriate (As the code stands, this is a hack)
9Signed-off-by: Ross Burton <ross.burton@intel.com> 9Signed-off-by: Ross Burton <ross.burton@intel.com>
10Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 10Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
11
12--- 11---
13 numpy/distutils/system_info.py | 42 +++++----------------------------- 12 numpy/distutils/system_info.py | 42 +++++-----------------------------
14 1 file changed, 6 insertions(+), 36 deletions(-) 13 1 file changed, 6 insertions(+), 36 deletions(-)
15 14
16diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py 15diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
17index feb28f6..a48d6d1 100644 16index 6478548..c0620e7 100644
18--- a/numpy/distutils/system_info.py 17--- a/numpy/distutils/system_info.py
19+++ b/numpy/distutils/system_info.py 18+++ b/numpy/distutils/system_info.py
20@@ -327,44 +327,14 @@ def add_system_root(library_root): 19@@ -326,44 +326,14 @@ def add_system_root(library_root):
21 add_system_root(os.path.join(conda_dir, 'Library')) 20 add_system_root(os.path.join(conda_dir, 'Library'))
22 21
23 else: 22 else:
diff --git a/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-Define-RISCV-32-support.patch b/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-Define-RISCV-32-support.patch
deleted file mode 100644
index 6da9047ec5..0000000000
--- a/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-Define-RISCV-32-support.patch
+++ /dev/null
@@ -1,58 +0,0 @@
1From 0e2b652a0eff85798584116c905a2d6ad8f25d5f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 15 Nov 2020 15:32:39 -0800
4Subject: [PATCH] numpy/core: Define RISCV-32 support
5
6Helps compile on riscv32
7
8Upstream-Status: Backport
9(https://github.com/numpy/numpy/pull/17780/commits/0e2b652a0eff85798584116c905a2d6ad8f25d5f)
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 numpy/_core/include/numpy/npy_cpu.h | 9 +++++++--
14 numpy/_core/include/numpy/npy_endian.h | 1 +
15 2 files changed, 8 insertions(+), 2 deletions(-)
16
17diff --git a/numpy/_core/include/numpy/npy_cpu.h b/numpy/_core/include/numpy/npy_cpu.h
18index a19f8e6bbd..15f9f12931 100644
19--- a/numpy/_core/include/numpy/npy_cpu.h
20+++ b/numpy/_core/include/numpy/npy_cpu.h
21@@ -18,6 +18,7 @@
22 * NPY_CPU_ARCEL
23 * NPY_CPU_ARCEB
24 * NPY_CPU_RISCV64
25+ * NPY_CPU_RISCV32
26 * NPY_CPU_LOONGARCH
27 * NPY_CPU_WASM
28 */
29@@ -102,8 +103,12 @@
30 #define NPY_CPU_ARCEL
31 #elif defined(__arc__) && defined(__BIG_ENDIAN__)
32 #define NPY_CPU_ARCEB
33-#elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64
34- #define NPY_CPU_RISCV64
35+#elif defined(__riscv)
36+ #if __riscv_xlen == 64
37+ #define NPY_CPU_RISCV64
38+ #elif __riscv_xlen == 32
39+ #define NPY_CPU_RISCV32
40+ #endif
41 #elif defined(__loongarch__)
42 #define NPY_CPU_LOONGARCH
43 #elif defined(__EMSCRIPTEN__)
44diff --git a/numpy/_core/include/numpy/npy_endian.h b/numpy/_core/include/numpy/npy_endian.h
45index 5e58a7f52c..09262120bf 100644
46--- a/numpy/_core/include/numpy/npy_endian.h
47+++ b/numpy/_core/include/numpy/npy_endian.h
48@@ -49,6 +49,7 @@
49 || defined(NPY_CPU_PPC64LE) \
50 || defined(NPY_CPU_ARCEL) \
51 || defined(NPY_CPU_RISCV64) \
52+ || defined(NPY_CPU_RISCV32) \
53 || defined(NPY_CPU_LOONGARCH) \
54 || defined(NPY_CPU_WASM)
55 #define NPY_BYTE_ORDER NPY_LITTLE_ENDIAN
56--
572.39.5
58
diff --git a/meta/recipes-devtools/python/python3-numpy/fix_reproducibility.patch b/meta/recipes-devtools/python/python3-numpy/fix_reproducibility.patch
index d952aed00c..18d7f3f84e 100644
--- a/meta/recipes-devtools/python/python3-numpy/fix_reproducibility.patch
+++ b/meta/recipes-devtools/python/python3-numpy/fix_reproducibility.patch
@@ -1,7 +1,11 @@
1This regex decides whether to use O3 opimisation on numpy or not. 1From cde931f4380745b9818b55d7b06a43d347518967 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Fri, 29 Sep 2023 22:53:24 +0100
4Subject: [PATCH] This regex decides whether to use O3 opimisation on numpy or
5 not.
2 6
3It includes "od", which happens to be a substring of "reproducible" 7It includes "od", which happens to be a substring of "reproducible"
4but not "qemux86-world". 8but not "qemux86-world".
5 9
6The regex will run against all compiler options including things like: 10The regex will run against all compiler options including things like:
7 11
@@ -17,12 +21,15 @@ reproducible target ran first and won the race to populate sstate.
17 21
18Upstream-Status: Inappropriate [upstream have dropped distutils and switched to meson] 22Upstream-Status: Inappropriate [upstream have dropped distutils and switched to meson]
19Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> 23Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
20 24---
21Index: numpy-1.26.0/numpy/distutils/ccompiler_opt.py 25 numpy/distutils/ccompiler_opt.py | 2 +-
22=================================================================== 26 1 file changed, 1 insertion(+), 1 deletion(-)
23--- numpy-1.26.0.orig/numpy/distutils/ccompiler_opt.py 27
24+++ numpy-1.26.0/numpy/distutils/ccompiler_opt.py 28diff --git a/numpy/distutils/ccompiler_opt.py b/numpy/distutils/ccompiler_opt.py
25@@ -990,7 +990,7 @@ class _CCompiler: 29index b1a6fa3..7b0302b 100644
30--- a/numpy/distutils/ccompiler_opt.py
31+++ b/numpy/distutils/ccompiler_opt.py
32@@ -991,7 +991,7 @@ def __init__(self):
26 ("cc_is_nocc", "", ""), 33 ("cc_is_nocc", "", ""),
27 ) 34 )
28 detect_args = ( 35 detect_args = (
diff --git a/meta/recipes-devtools/python/python3-numpy_2.1.3.bb b/meta/recipes-devtools/python/python3-numpy_2.2.1.bb
index 0120bee439..251e7b0c64 100644
--- a/meta/recipes-devtools/python/python3-numpy_2.1.3.bb
+++ b/meta/recipes-devtools/python/python3-numpy_2.2.1.bb
@@ -9,11 +9,10 @@ SRCNAME = "numpy"
9 9
10SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${SRCNAME}-${PV}.tar.gz \ 10SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${SRCNAME}-${PV}.tar.gz \
11 file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \ 11 file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
12 file://0001-numpy-core-Define-RISCV-32-support.patch \
13 file://fix_reproducibility.patch \ 12 file://fix_reproducibility.patch \
14 file://run-ptest \ 13 file://run-ptest \
15 " 14 "
16SRC_URI[sha256sum] = "aa08e04e08aaf974d4458def539dece0d28146d866a39da5639596f4921fd761" 15SRC_URI[sha256sum] = "45681fd7128c8ad1c379f0ca0776a8b0c6583d2f69889ddac01559dfe4390918"
17 16
18GITHUB_BASE_URI = "https://github.com/numpy/numpy/releases" 17GITHUB_BASE_URI = "https://github.com/numpy/numpy/releases"
19UPSTREAM_CHECK_REGEX = "releases/tag/v?(?P<pver>\d+(\.\d+)+)$" 18UPSTREAM_CHECK_REGEX = "releases/tag/v?(?P<pver>\d+(\.\d+)+)$"
@@ -22,6 +21,8 @@ inherit pkgconfig ptest python_mesonpy github-releases cython
22 21
23S = "${WORKDIR}/numpy-${PV}" 22S = "${WORKDIR}/numpy-${PV}"
24 23
24PACKAGECONFIG[svml] = "-Ddisable-svml=false,-Ddisable-svml=true"
25
25# Remove references to buildpaths from numpy's __config__.py 26# Remove references to buildpaths from numpy's __config__.py
26do_install:append() { 27do_install:append() {
27 sed -i \ 28 sed -i \