diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2021-11-14 13:15:55 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-15 12:55:27 +0000 |
commit | a6757e4a5272b97b144dd474d71a290dba77925b (patch) | |
tree | 683cef25bee9c805f1bed782532d1f77084018a1 /meta/recipes-devtools/python-numpy | |
parent | 6c220ed3f411b73d2e80e15de71d022d58db2232 (diff) | |
download | poky-a6757e4a5272b97b144dd474d71a290dba77925b.tar.gz |
python3-numpy: move recipe to python directory
This recipe had been moved out from python directory since 2016[1] in
order to share patches between python2 and python3. But now there is no
reason to keep it in its own directory as we only keep python3-nump.
Move it back to python directory.
[1] https://git.openembedded.org/openembedded-core/commit/?id=9bffe2f9fb4ce6c0b265f27e5b484fbe076c6349
(From OE-Core rev: e5702b8ebd16949c736b8c2f18bf35c0d64d80bd)
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python-numpy')
4 files changed, 0 insertions, 191 deletions
diff --git a/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch b/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch deleted file mode 100644 index 9f5f25f9b5..0000000000 --- a/meta/recipes-devtools/python-numpy/files/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | From 27f6687e49bf555fc494d2f14bae6ecd0fa30f14 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
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 | ||
5 | |||
6 | avoid host contamination. | ||
7 | |||
8 | Upstream-Status: Inappropriate (As the code stands, this is a hack) | ||
9 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
10 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
11 | --- | ||
12 | numpy/distutils/system_info.py | 42 +++++----------------------------- | ||
13 | 1 file changed, 6 insertions(+), 36 deletions(-) | ||
14 | |||
15 | diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py | ||
16 | index 82e864a..135246d 100644 | ||
17 | --- a/numpy/distutils/system_info.py | ||
18 | +++ b/numpy/distutils/system_info.py | ||
19 | @@ -323,44 +323,14 @@ if sys.platform == 'win32': | ||
20 | add_system_root(os.path.join(conda_dir, 'Library')) | ||
21 | |||
22 | else: | ||
23 | - default_lib_dirs = libpaths(['/usr/local/lib', '/opt/lib', '/usr/lib', | ||
24 | - '/opt/local/lib', '/sw/lib'], platform_bits) | ||
25 | default_runtime_dirs = [] | ||
26 | - default_include_dirs = ['/usr/local/include', | ||
27 | - '/opt/include', | ||
28 | - # path of umfpack under macports | ||
29 | - '/opt/local/include/ufsparse', | ||
30 | - '/opt/local/include', '/sw/include', | ||
31 | - '/usr/include/suitesparse'] | ||
32 | - default_src_dirs = ['.', '/usr/local/src', '/opt/src', '/sw/src'] | ||
33 | - | ||
34 | - default_x11_lib_dirs = libpaths(['/usr/X11R6/lib', '/usr/X11/lib', | ||
35 | - '/usr/lib'], platform_bits) | ||
36 | - default_x11_include_dirs = ['/usr/X11R6/include', '/usr/X11/include'] | ||
37 | - | ||
38 | - if os.path.exists('/usr/lib/X11'): | ||
39 | - globbed_x11_dir = glob('/usr/lib/*/libX11.so') | ||
40 | - if globbed_x11_dir: | ||
41 | - x11_so_dir = os.path.split(globbed_x11_dir[0])[0] | ||
42 | - default_x11_lib_dirs.extend([x11_so_dir, '/usr/lib/X11']) | ||
43 | - default_x11_include_dirs.extend(['/usr/lib/X11/include', | ||
44 | - '/usr/include/X11']) | ||
45 | - | ||
46 | - with open(os.devnull, 'w') as tmp: | ||
47 | - try: | ||
48 | - p = subprocess.Popen(["gcc", "-print-multiarch"], stdout=subprocess.PIPE, | ||
49 | - stderr=tmp) | ||
50 | - except (OSError, DistutilsError): | ||
51 | - # OSError if gcc is not installed, or SandboxViolation (DistutilsError | ||
52 | - # subclass) if an old setuptools bug is triggered (see gh-3160). | ||
53 | - pass | ||
54 | - else: | ||
55 | - triplet = str(p.communicate()[0].decode().strip()) | ||
56 | - if p.returncode == 0: | ||
57 | - # gcc supports the "-print-multiarch" option | ||
58 | - default_x11_lib_dirs += [os.path.join("/usr/lib/", triplet)] | ||
59 | - default_lib_dirs += [os.path.join("/usr/lib/", triplet)] | ||
60 | |||
61 | + default_lib_dirs = libpaths(['/deadir/lib'], platform_bits) | ||
62 | + default_include_dirs = ['/deaddir/include'] | ||
63 | + default_src_dirs = ['.', '/deaddir/src'] | ||
64 | + | ||
65 | + default_x11_lib_dirs = libpaths(['/deaddir/lib'], platform_bits) | ||
66 | + default_x11_include_dirs = ['/deaddir/include'] | ||
67 | |||
68 | if os.path.join(sys.prefix, 'lib') not in default_lib_dirs: | ||
69 | default_lib_dirs.insert(0, os.path.join(sys.prefix, 'lib')) | ||
70 | -- | ||
71 | 2.25.1 | ||
72 | |||
diff --git a/meta/recipes-devtools/python-numpy/files/0001-numpy-core-Define-RISCV-32-support.patch b/meta/recipes-devtools/python-numpy/files/0001-numpy-core-Define-RISCV-32-support.patch deleted file mode 100644 index b60ca1d216..0000000000 --- a/meta/recipes-devtools/python-numpy/files/0001-numpy-core-Define-RISCV-32-support.patch +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | From dbcf296f84e5cef6a3ff0f1c469a4508f1e0fb15 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 | 9 +++++++-- | ||
12 | numpy/core/include/numpy/npy_endian.h | 1 + | ||
13 | 2 files changed, 8 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h | ||
16 | index 4dbf9d84e..bc41a7eda 100644 | ||
17 | --- a/numpy/core/include/numpy/npy_cpu.h | ||
18 | +++ b/numpy/core/include/numpy/npy_cpu.h | ||
19 | @@ -18,6 +18,7 @@ | ||
20 | * NPY_CPU_ARCEL | ||
21 | * NPY_CPU_ARCEB | ||
22 | * NPY_CPU_RISCV64 | ||
23 | + * NPY_CPU_RISCV32 | ||
24 | * NPY_CPU_WASM | ||
25 | */ | ||
26 | #ifndef _NPY_CPUARCH_H_ | ||
27 | @@ -100,8 +101,12 @@ | ||
28 | #define NPY_CPU_ARCEL | ||
29 | #elif defined(__arc__) && defined(__BIG_ENDIAN__) | ||
30 | #define NPY_CPU_ARCEB | ||
31 | -#elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64 | ||
32 | - #define NPY_CPU_RISCV64 | ||
33 | +#elif defined(__riscv) | ||
34 | + #if __riscv_xlen == 64 | ||
35 | + #define NPY_CPU_RISCV64 | ||
36 | + #elif __riscv_xlen == 32 | ||
37 | + #define NPY_CPU_RISCV32 | ||
38 | + #endif | ||
39 | #elif defined(__EMSCRIPTEN__) | ||
40 | /* __EMSCRIPTEN__ is defined by emscripten: an LLVM-to-Web compiler */ | ||
41 | #define NPY_CPU_WASM | ||
42 | diff --git a/numpy/core/include/numpy/npy_endian.h b/numpy/core/include/numpy/npy_endian.h | ||
43 | index aa367a002..d59484573 100644 | ||
44 | --- a/numpy/core/include/numpy/npy_endian.h | ||
45 | +++ b/numpy/core/include/numpy/npy_endian.h | ||
46 | @@ -49,6 +49,7 @@ | ||
47 | || defined(NPY_CPU_PPC64LE) \ | ||
48 | || defined(NPY_CPU_ARCEL) \ | ||
49 | || defined(NPY_CPU_RISCV64) \ | ||
50 | + || defined(NPY_CPU_RISCV32) \ | ||
51 | || defined(NPY_CPU_WASM) | ||
52 | #define NPY_BYTE_ORDER NPY_LITTLE_ENDIAN | ||
53 | #elif defined(NPY_CPU_PPC) \ | ||
54 | -- | ||
55 | 2.29.2 | ||
56 | |||
diff --git a/meta/recipes-devtools/python-numpy/files/run-ptest b/meta/recipes-devtools/python-numpy/files/run-ptest deleted file mode 100644 index 9a1c72aeb1..0000000000 --- a/meta/recipes-devtools/python-numpy/files/run-ptest +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | #!/usr/bin/env python3 | ||
2 | |||
3 | import numpy | ||
4 | numpy.test(label='full', verbose=2) | ||
5 | |||
diff --git a/meta/recipes-devtools/python-numpy/python3-numpy_1.21.4.bb b/meta/recipes-devtools/python-numpy/python3-numpy_1.21.4.bb deleted file mode 100644 index 8988a5bc39..0000000000 --- a/meta/recipes-devtools/python-numpy/python3-numpy_1.21.4.bb +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | SUMMARY = "A sophisticated Numeric Processing Package for Python" | ||
2 | HOMEPAGE = "https://numpy.org/" | ||
3 | DESCRIPTION = "NumPy is the fundamental package needed for scientific computing with Python." | ||
4 | SECTION = "devel/python" | ||
5 | LICENSE = "BSD-3-Clause & BSD-2-Clause & PSF & Apache-2.0 & MIT" | ||
6 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b076ad374a7d311ba3126a22b2d52596" | ||
7 | |||
8 | SRCNAME = "numpy" | ||
9 | |||
10 | SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${SRCNAME}-${PV}.tar.gz \ | ||
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://run-ptest \ | ||
14 | " | ||
15 | SRC_URI[sha256sum] = "5d412381aa489b8be82ac5c6a9e99c3eb3f754245ad3f90ab5c339d92f25fb47" | ||
16 | |||
17 | UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases" | ||
18 | UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar" | ||
19 | |||
20 | DEPENDS += "python3-cython-native" | ||
21 | |||
22 | inherit ptest setuptools3 | ||
23 | |||
24 | S = "${WORKDIR}/numpy-${PV}" | ||
25 | |||
26 | CLEANBROKEN = "1" | ||
27 | |||
28 | FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a ${PYTHON_SITEPACKAGES_DIR}/numpy/random/lib/*.a" | ||
29 | |||
30 | # install what is needed for numpy.test() | ||
31 | RDEPENDS:${PN} = "${PYTHON_PN}-unittest \ | ||
32 | ${PYTHON_PN}-difflib \ | ||
33 | ${PYTHON_PN}-pprint \ | ||
34 | ${PYTHON_PN}-pickle \ | ||
35 | ${PYTHON_PN}-shell \ | ||
36 | ${PYTHON_PN}-doctest \ | ||
37 | ${PYTHON_PN}-datetime \ | ||
38 | ${PYTHON_PN}-distutils \ | ||
39 | ${PYTHON_PN}-misc \ | ||
40 | ${PYTHON_PN}-mmap \ | ||
41 | ${PYTHON_PN}-netclient \ | ||
42 | ${PYTHON_PN}-numbers \ | ||
43 | ${PYTHON_PN}-pydoc \ | ||
44 | ${PYTHON_PN}-pkgutil \ | ||
45 | ${PYTHON_PN}-email \ | ||
46 | ${PYTHON_PN}-compression \ | ||
47 | ${PYTHON_PN}-ctypes \ | ||
48 | ${PYTHON_PN}-threading \ | ||
49 | ${PYTHON_PN}-multiprocessing \ | ||
50 | " | ||
51 | RDEPENDS:${PN}-ptest += "${PYTHON_PN}-pytest \ | ||
52 | ${PYTHON_PN}-hypothesis \ | ||
53 | ${PYTHON_PN}-sortedcontainers \ | ||
54 | ${PYTHON_PN}-resource \ | ||
55 | ldd \ | ||
56 | " | ||
57 | |||
58 | BBCLASSEXTEND = "native nativesdk" | ||