diff options
Diffstat (limited to 'meta/recipes-devtools/python/python3-numpy')
4 files changed, 31 insertions, 65 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..3e08b43587 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 @@ | |||
1 | From 46eea664cf89d0602e7ff16d587c37c045b125b7 Mon Sep 17 00:00:00 2001 | 1 | From b036c984b019d941ead2efd5a05d1588c4bc193a Mon Sep 17 00:00:00 2001 |
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
3 | Date: Thu, 10 Dec 2015 13:20:30 +0200 | 3 | Date: Thu, 10 Dec 2015 13:20:30 +0200 |
4 | Subject: [PATCH] Don't search /usr and so on for libraries by default to | 4 | Subject: [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 | |||
8 | Upstream-Status: Inappropriate (As the code stands, this is a hack) | 8 | Upstream-Status: Inappropriate (As the code stands, this is a hack) |
9 | Signed-off-by: Ross Burton <ross.burton@intel.com> | 9 | Signed-off-by: Ross Burton <ross.burton@intel.com> |
10 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | 10 | Signed-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 | ||
16 | diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py | 15 | diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py |
17 | index feb28f6..a48d6d1 100644 | 16 | index 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 676bdbb3af..0000000000 --- a/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-Define-RISCV-32-support.patch +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | From eb6d6579150bf4684603ce377c51e90ad3bb8109 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 15 Nov 2020 15:32:39 -0800 | ||
4 | Subject: [PATCH] numpy/core: Define RISCV-32 support | ||
5 | |||
6 | Helps compile on riscv32 | ||
7 | |||
8 | Upstream-Status: Submitted [https://github.com/numpy/numpy/pull/17780] | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | numpy/core/include/numpy/npy_cpu.h | 3 +++ | ||
12 | numpy/core/include/numpy/npy_endian.h | 1 + | ||
13 | 2 files changed, 4 insertions(+) | ||
14 | |||
15 | diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h | ||
16 | index 78d229e..04be511 100644 | ||
17 | --- a/numpy/core/include/numpy/npy_cpu.h | ||
18 | +++ b/numpy/core/include/numpy/npy_cpu.h | ||
19 | @@ -19,6 +19,7 @@ | ||
20 | * NPY_CPU_ARCEB | ||
21 | * NPY_CPU_RISCV64 | ||
22 | * NPY_CPU_LOONGARCH | ||
23 | + * NPY_CPU_RISCV32 | ||
24 | * NPY_CPU_WASM | ||
25 | */ | ||
26 | #ifndef NUMPY_CORE_INCLUDE_NUMPY_NPY_CPU_H_ | ||
27 | @@ -104,6 +105,8 @@ | ||
28 | #define NPY_CPU_ARCEB | ||
29 | #elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64 | ||
30 | #define NPY_CPU_RISCV64 | ||
31 | +#elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 32 | ||
32 | + #define NPY_CPU_RISCV32 | ||
33 | #elif defined(__loongarch__) | ||
34 | #define NPY_CPU_LOONGARCH | ||
35 | #elif defined(__EMSCRIPTEN__) | ||
36 | diff --git a/numpy/core/include/numpy/npy_endian.h b/numpy/core/include/numpy/npy_endian.h | ||
37 | index 5e58a7f..0926212 100644 | ||
38 | --- a/numpy/core/include/numpy/npy_endian.h | ||
39 | +++ b/numpy/core/include/numpy/npy_endian.h | ||
40 | @@ -49,6 +49,7 @@ | ||
41 | || defined(NPY_CPU_PPC64LE) \ | ||
42 | || defined(NPY_CPU_ARCEL) \ | ||
43 | || defined(NPY_CPU_RISCV64) \ | ||
44 | + || defined(NPY_CPU_RISCV32) \ | ||
45 | || defined(NPY_CPU_LOONGARCH) \ | ||
46 | || defined(NPY_CPU_WASM) | ||
47 | #define NPY_BYTE_ORDER NPY_LITTLE_ENDIAN | ||
48 | -- | ||
49 | 2.20.1 | ||
50 | |||
diff --git a/meta/recipes-devtools/python/python3-numpy/fix_reproducibility.patch b/meta/recipes-devtools/python/python3-numpy/fix_reproducibility.patch index d952aed00c..8b39b7bcfe 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 @@ | |||
1 | This regex decides whether to use O3 opimisation on numpy or not. | 1 | From 45d76002bc989a9098141f2bfcd2d2fabc5a04d5 Mon Sep 17 00:00:00 2001 |
2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
3 | Date: Fri, 29 Sep 2023 22:53:24 +0100 | ||
4 | Subject: [PATCH] This regex decides whether to use O3 opimisation on numpy or | ||
5 | not. | ||
2 | 6 | ||
3 | It includes "od", which happens to be a substring of "reproducible" | 7 | It includes "od", which happens to be a substring of "reproducible" |
4 | but not "qemux86-world". | 8 | but not "qemux86-world". |
5 | 9 | ||
6 | The regex will run against all compiler options including things like: | 10 | The 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 | ||
18 | Upstream-Status: Inappropriate [upstream have dropped distutils and switched to meson] | 22 | Upstream-Status: Inappropriate [upstream have dropped distutils and switched to meson] |
19 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | 23 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> |
20 | 24 | --- | |
21 | Index: 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 | 28 | diff --git a/numpy/distutils/ccompiler_opt.py b/numpy/distutils/ccompiler_opt.py |
25 | @@ -990,7 +990,7 @@ class _CCompiler: | 29 | index 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/run-ptest b/meta/recipes-devtools/python/python3-numpy/run-ptest index 9a1c72aeb1..6e76dffc59 100644 --- a/meta/recipes-devtools/python/python3-numpy/run-ptest +++ b/meta/recipes-devtools/python/python3-numpy/run-ptest | |||
@@ -1,5 +1,15 @@ | |||
1 | #!/usr/bin/env python3 | 1 | #!/bin/sh |
2 | 2 | ||
3 | import numpy | 3 | # By default, numpy will use /tmp as the root path for temporary files used |
4 | numpy.test(label='full', verbose=2) | 4 | # during tests, but if this is a tmpfs it may fill up quickly and cause many of |
5 | # the tests to report "no space left on device" errors. Create a custom | ||
6 | # directory for these and point pytest at it so we can take advantage of the | ||
7 | # storage provided in the rootfs. | ||
8 | export PYTEST_DEBUG_TEMPROOT="/usr/lib/python3-numpy/ptest/tmp" | ||
9 | mkdir -p "$PYTEST_DEBUG_TEMPROOT" | ||
5 | 10 | ||
11 | # test_mem_policy fails if there's no C compiler present, but we don't want to | ||
12 | # include gcc as a ptest dependency, so skip that. test_big_arrays uses up a | ||
13 | # large amount of storage, so skip that too. | ||
14 | pytest --automake -m "not slow" -k "not test_mem_policy and not test_big_arrays" /usr/lib/python3.*/site-packages/numpy | ||
15 | rm -rf "$PYTEST_DEBUG_TEMPROOT" | ||