From 633b403b6db40cf1a88a4e952615c03f290227ea Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Sun, 9 Jan 2022 23:27:24 +0100 Subject: python3-numpy: update 1.21.4 -> 1.22.0 (From OE-Core rev: 6b9f2e078fb5653a1cedd64e90459e2f0780eb7e) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- .../0001-numpy-core-Define-RISCV-32-support.patch | 40 ++++++--------- ...-numpy-core-setup.py-disable-svml-for-now.patch | 29 +++++++++++ .../python/python3-numpy_1.21.5.bb | 59 --------------------- .../python/python3-numpy_1.22.0.bb | 60 ++++++++++++++++++++++ 4 files changed, 106 insertions(+), 82 deletions(-) create mode 100644 meta/recipes-devtools/python/python3-numpy/0001-numpy-core-setup.py-disable-svml-for-now.patch delete mode 100644 meta/recipes-devtools/python/python3-numpy_1.21.5.bb create mode 100644 meta/recipes-devtools/python/python3-numpy_1.22.0.bb (limited to 'meta/recipes-devtools/python') 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 index b60ca1d216..676bdbb3af 100644 --- 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 @@ -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 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 --- - 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 diff --git a/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-setup.py-disable-svml-for-now.patch b/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-setup.py-disable-svml-for-now.patch new file mode 100644 index 0000000000..66e322116a --- /dev/null +++ b/meta/recipes-devtools/python/python3-numpy/0001-numpy-core-setup.py-disable-svml-for-now.patch @@ -0,0 +1,29 @@ +From 0f0601e79f9ce7614d157284523e6cd8af2259d5 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +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 +--- + 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"): diff --git a/meta/recipes-devtools/python/python3-numpy_1.21.5.bb b/meta/recipes-devtools/python/python3-numpy_1.21.5.bb deleted file mode 100644 index bdf99b492b..0000000000 --- a/meta/recipes-devtools/python/python3-numpy_1.21.5.bb +++ /dev/null @@ -1,59 +0,0 @@ -SUMMARY = "A sophisticated Numeric Processing Package for Python" -HOMEPAGE = "https://numpy.org/" -DESCRIPTION = "NumPy is the fundamental package needed for scientific computing with Python." -SECTION = "devel/python" -LICENSE = "BSD-3-Clause & BSD-2-Clause & PSF & Apache-2.0 & MIT" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b076ad374a7d311ba3126a22b2d52596" - -SRCNAME = "numpy" - -SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${SRCNAME}-${PV}.tar.gz \ - file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \ - file://0001-numpy-core-Define-RISCV-32-support.patch \ - file://run-ptest \ -" -SRC_URI[sha256sum] = "1a7ee0ffb35dc7489aebe5185a483f4c43b0d2cf784c3c9940f975a7dde56506" - -UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases" -UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)\.tar" - -DEPENDS += "python3-cython-native" - -inherit ptest setuptools3 - -S = "${WORKDIR}/numpy-${PV}" - -CLEANBROKEN = "1" - -FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a ${PYTHON_SITEPACKAGES_DIR}/numpy/random/lib/*.a" - -# install what is needed for numpy.test() -RDEPENDS:${PN} = "${PYTHON_PN}-unittest \ - ${PYTHON_PN}-difflib \ - ${PYTHON_PN}-pprint \ - ${PYTHON_PN}-pickle \ - ${PYTHON_PN}-shell \ - ${PYTHON_PN}-doctest \ - ${PYTHON_PN}-datetime \ - ${PYTHON_PN}-distutils \ - ${PYTHON_PN}-misc \ - ${PYTHON_PN}-mmap \ - ${PYTHON_PN}-netclient \ - ${PYTHON_PN}-numbers \ - ${PYTHON_PN}-pydoc \ - ${PYTHON_PN}-pkgutil \ - ${PYTHON_PN}-email \ - ${PYTHON_PN}-compression \ - ${PYTHON_PN}-ctypes \ - ${PYTHON_PN}-threading \ - ${PYTHON_PN}-multiprocessing \ - ${PYTHON_PN}-json \ -" -RDEPENDS:${PN}-ptest += "${PYTHON_PN}-pytest \ - ${PYTHON_PN}-hypothesis \ - ${PYTHON_PN}-sortedcontainers \ - ${PYTHON_PN}-resource \ - ldd \ -" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-devtools/python/python3-numpy_1.22.0.bb b/meta/recipes-devtools/python/python3-numpy_1.22.0.bb new file mode 100644 index 0000000000..556e2dd5c9 --- /dev/null +++ b/meta/recipes-devtools/python/python3-numpy_1.22.0.bb @@ -0,0 +1,60 @@ +SUMMARY = "A sophisticated Numeric Processing Package for Python" +HOMEPAGE = "https://numpy.org/" +DESCRIPTION = "NumPy is the fundamental package needed for scientific computing with Python." +SECTION = "devel/python" +LICENSE = "BSD-3-Clause & BSD-2-Clause & PSF & Apache-2.0 & MIT" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b076ad374a7d311ba3126a22b2d52596" + +SRCNAME = "numpy" + +SRC_URI = "https://github.com/${SRCNAME}/${SRCNAME}/releases/download/v${PV}/${SRCNAME}-${PV}.tar.gz \ + file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \ + file://0001-numpy-core-Define-RISCV-32-support.patch \ + file://run-ptest \ + file://0001-numpy-core-setup.py-disable-svml-for-now.patch \ + " +SRC_URI[sha256sum] = "f2be14ba396780a6f662b8ba1a24466c9cf18a6a386174f614668e58387a13d7" + +UPSTREAM_CHECK_URI = "https://github.com/numpy/numpy/releases" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)\.tar" + +DEPENDS += "python3-cython-native" + +inherit ptest setuptools3 + +S = "${WORKDIR}/numpy-${PV}" + +CLEANBROKEN = "1" + +FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a ${PYTHON_SITEPACKAGES_DIR}/numpy/random/lib/*.a" + +# install what is needed for numpy.test() +RDEPENDS:${PN} = "${PYTHON_PN}-unittest \ + ${PYTHON_PN}-difflib \ + ${PYTHON_PN}-pprint \ + ${PYTHON_PN}-pickle \ + ${PYTHON_PN}-shell \ + ${PYTHON_PN}-doctest \ + ${PYTHON_PN}-datetime \ + ${PYTHON_PN}-distutils \ + ${PYTHON_PN}-misc \ + ${PYTHON_PN}-mmap \ + ${PYTHON_PN}-netclient \ + ${PYTHON_PN}-numbers \ + ${PYTHON_PN}-pydoc \ + ${PYTHON_PN}-pkgutil \ + ${PYTHON_PN}-email \ + ${PYTHON_PN}-compression \ + ${PYTHON_PN}-ctypes \ + ${PYTHON_PN}-threading \ + ${PYTHON_PN}-multiprocessing \ + ${PYTHON_PN}-json \ +" +RDEPENDS:${PN}-ptest += "${PYTHON_PN}-pytest \ + ${PYTHON_PN}-hypothesis \ + ${PYTHON_PN}-sortedcontainers \ + ${PYTHON_PN}-resource \ + ldd \ +" + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf