Skip to contentSkip to conversation

python3-meson-python: upgrade 0.16.0 -> 0.17.1

PATCH In review Trevor Gamblin 2 participants 5 messages Nov 21, 2024 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 python3-meson-python: upgrade 0.16.0 -> 0.17.1

Changelog (https://mesonbuild.com/meson-python/changelog.html):

0.17.1

- Update tests to work with newly released pyproject-metadata 0.9.0. Fix tests to work when not executed in a git work tree.

Daniele Nicolodi — 23-10-2024.

0.17.0

- Refuse to build wheels targeting the limited API and free-threaded
CPython: the free-threaded CPython build does not support the limited API yet.
- Always use UTF-8 encoding for writing Meson native and cross files. Always use UTF-8 encoding for reading read Meson introspection data and pyproject.toml.
- Do not include uncommitted changes when creating source distributions. Previously, uncommitted changes to files under version control were included, but not untracked files. There was no strong use case for this behavior and it was too surprising to keep it.
- Make source distribution reproducible: use the modification time of pyproject.toml for the generated files in the source distribution archives.
- Disable the abi3 wheel tag for PyPy when building wheels targeting the limited API: PyPy supports the limited API but not the stable ABI.
- Raise ImportError when the package rebuild fails when importing an editable install.
- Fix the wheel platform tag for GraalPy.
- Add .gitignore and .hgignore files to build directory if it is empty.
- Allow install_subdir() of missing directories.

Christian Clauss, Daniele Nicolodi, Jonathan J. Helmus, Leo Singer, Loïc Estève, Michael Simacek, Ralf Gommers, Simon McVittie — 19-10-2024.

---
 ...n3-meson-python_0.16.0.bb => python3-meson-python_0.17.1.bb} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-devtools/python/{python3-meson-python_0.16.0.bb => python3-meson-python_0.17.1.bb} (85%)
meta/recipes-devtools/python/python3-meson-python_0.17.1.bb renamed from meta/recipes-devtools/python/python3-meson-python_0.16.0.bb +1 -1
similarity index 85%
rename from meta/recipes-devtools/python/python3-meson-python_0.16.0.bb
rename to meta/recipes-devtools/python/python3-meson-python_0.17.1.bb
index 79a7ff05eff..04f0a1eff89 100644
@@ -13,7 +13,7 @@ DEPENDS = " \
 PYPI_PACKAGE = "meson_python"
 
 inherit pypi python_mesonpy
-SRC_URI[sha256sum] = "9068c17e36c89d6c7ff709fffb2a8a9925e8cd0b02629728e5ceaf2ec505cb5f"
+SRC_URI[sha256sum] = "efb91f69f2e19eef7bc9a471ed2a4e730088cc6b39eacaf3e49fc4f930eb5f83"
 
 DEPENDS:remove:class-native = "python3-meson-python-native"
 
Signature · 1 line
2.39.5
#1 lore raw

PATCH 2/2 python3-numpy: upgrade 1.26.4 -> 2.1.3

- This release contains numerous API changes and bug fixes.
Changelog: https://github.com/numpy/numpy/releases

- Notably, the build backend has switched to mesonpy since 1.26.4.

- Patch 0001-numpy-core-Define-RISCV-32-support.patch had to be updated to change the paths for the target files. It has now been merged upstream, but isn't included in any release yet. PR for reference:

https://github.com/numpy/numpy/pull/17780

- Builds OK and seems to be compatible with current piglit and pandas (meta-python), which was not the case for the previous upgrade attempt to numpy 2.0.1.

- For numpy, add 'pkgconfig' to inherit to avoid errors like this at do_compile:

  | Found Pkg-config: NO
  | Run-time dependency python found: YES 3.12
  | Has header "Python.h" with dependency python: NO
  |
  | ../numpy-2.0.0/meson.build:44:2: ERROR: Problem encountered: Cannot compile `Python.h`. Perhaps you need to install python-dev|python-devel
  |
  | A full log can be found at /home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.0.0/build/meson-logs/meson-log.txt

- Mmodify the FILES:${PN}-staticdev line to fix a QA issue.

- This is now reproducible as of oe-core commit: 917df5ed022f

License-Update: Change copyright year to 2024

buildall-qemu log:

BUILDALL-QEMU LOG FOR python3-numpy
START TIME: 2024-11-20_14:02:08
HOSTNAME: megalith
HOST OS: Debian GNU/Linux 12 (bookworm)
HOST KERNEL: 6.1.0-27-amd64
===============
BUILD RESULTS:
[glibc]
FAIL: qemuloongarch64
PASS: qemuriscv32
PASS: qemuarmv5
PASS: qemuppc
PASS: qemumips64
PASS: qemuriscv64
PASS: qemuarm64
PASS: qemuarm
PASS: qemux86-64
PASS: qemuppc64
PASS: qemux86
PASS: qemumips
[musl]
FAIL: qemuloongarch64
FAIL: qemuriscv32
PASS: qemuarmv5
PASS: qemuppc
PASS: qemumips64
PASS: qemuriscv64
PASS: qemuarm64
PASS: qemuarm
PASS: qemux86-64
PASS: qemuppc64
PASS: qemux86
PASS: qemumips
===============
PASSED: 21
FAILED: 3

---
 ...1-numpy-core-Define-RISCV-32-support.patch | 52 +++++++++++--------
 ...numpy_1.26.4.bb => python3-numpy_2.1.3.bb} | 26 ++++++----
 2 files changed, 46 insertions(+), 32 deletions(-)
 rename meta/recipes-devtools/python/{python3-numpy_1.26.4.bb => python3-numpy_2.1.3.bb} (68%)
meta/recipes-devtools/python/python3-numpy/0001-numpy-core-Define-RISCV-32-support.patch +30 -22
index 676bdbb3afd..6da9047ec57 100644
@@ -1,42 +1,50 @@
-From eb6d6579150bf4684603ce377c51e90ad3bb8109 Mon Sep 17 00:00:00 2001
+From 0e2b652a0eff85798584116c905a2d6ad8f25d5f Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Sun, 15 Nov 2020 15:32:39 -0800
 Subject: [PATCH] numpy/core: Define RISCV-32 support
 
 Helps compile on riscv32
 
-Upstream-Status: Submitted [https://github.com/numpy/numpy/pull/17780]
+Upstream-Status: Backport
+(https://github.com/numpy/numpy/pull/17780/commits/0e2b652a0eff85798584116c905a2d6ad8f25d5f)
+
 Signed-off-by: Khem Raj <[email protected]>
 ---
- numpy/core/include/numpy/npy_cpu.h    | 3 +++
- numpy/core/include/numpy/npy_endian.h | 1 +
- 2 files changed, 4 insertions(+)
+ numpy/_core/include/numpy/npy_cpu.h    | 9 +++++++--
+ numpy/_core/include/numpy/npy_endian.h | 1 +
+ 2 files changed, 8 insertions(+), 2 deletions(-)
 
-diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h
-index 78d229e..04be511 100644
---- a/numpy/core/include/numpy/npy_cpu.h
-+++ b/numpy/core/include/numpy/npy_cpu.h
-@@ -19,6 +19,7 @@
+diff --git a/numpy/_core/include/numpy/npy_cpu.h b/numpy/_core/include/numpy/npy_cpu.h
+index a19f8e6bbd..15f9f12931 100644
+--- a/numpy/_core/include/numpy/npy_cpu.h
++++ b/numpy/_core/include/numpy/npy_cpu.h
+@@ -18,6 +18,7 @@
+  *              NPY_CPU_ARCEL
   *              NPY_CPU_ARCEB
   *              NPY_CPU_RISCV64
-  *              NPY_CPU_LOONGARCH
 + *              NPY_CPU_RISCV32
+  *              NPY_CPU_LOONGARCH
   *              NPY_CPU_WASM
   */
- #ifndef NUMPY_CORE_INCLUDE_NUMPY_NPY_CPU_H_
-@@ -104,6 +105,8 @@
+@@ -102,8 +103,12 @@
+     #define NPY_CPU_ARCEL
+ #elif defined(__arc__) && defined(__BIG_ENDIAN__)
      #define NPY_CPU_ARCEB
- #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(__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(__loongarch__)
      #define NPY_CPU_LOONGARCH
  #elif defined(__EMSCRIPTEN__)
-diff --git a/numpy/core/include/numpy/npy_endian.h b/numpy/core/include/numpy/npy_endian.h
-index 5e58a7f..0926212 100644
---- a/numpy/core/include/numpy/npy_endian.h
-+++ b/numpy/core/include/numpy/npy_endian.h
+diff --git a/numpy/_core/include/numpy/npy_endian.h b/numpy/_core/include/numpy/npy_endian.h
+index 5e58a7f52c..09262120bf 100644
+--- a/numpy/_core/include/numpy/npy_endian.h
++++ b/numpy/_core/include/numpy/npy_endian.h
 @@ -49,6 +49,7 @@
              || defined(NPY_CPU_PPC64LE)       \
              || defined(NPY_CPU_ARCEL)         \
@@ -46,5 +54,5 @@ index 5e58a7f..0926212 100644
              || defined(NPY_CPU_WASM)
          #define NPY_BYTE_ORDER NPY_LITTLE_ENDIAN
 -- 
-2.20.1
+2.39.5
 
meta/recipes-devtools/python/python3-numpy_2.1.3.bb renamed from meta/recipes-devtools/python/python3-numpy_1.26.4.bb +16 -10
similarity index 68%
rename from meta/recipes-devtools/python/python3-numpy_1.26.4.bb
rename to meta/recipes-devtools/python/python3-numpy_2.1.3.bb
index fa78b07f48b..da75dff1e04 100644
@@ -3,7 +3,7 @@ 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-2.0 & Apache-2.0 & MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a752eb20459cf74a9d84ee4825e8317c"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1de863c37a83e71b1e97b64d036ea78b"
 
 SRCNAME = "numpy"
 
@@ -13,22 +13,31 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${SRCNAME}-${PV}.tar.gz \
            file://fix_reproducibility.patch \
            file://run-ptest \
            "
-SRC_URI[sha256sum] = "2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010"
+SRC_URI[sha256sum] = "aa08e04e08aaf974d4458def539dece0d28146d866a39da5639596f4921fd761"
 
 GITHUB_BASE_URI = "https://github.com/numpy/numpy/releases"
 UPSTREAM_CHECK_REGEX = "releases/tag/v?(?P<pver>\d+(\.\d+)+)$"
 
-inherit ptest setuptools3 github-releases cython
+inherit ptest python_mesonpy github-releases cython
 
 S = "${WORKDIR}/numpy-${PV}"
 
-CLEANBROKEN = "1"
+# Remove references to buildpaths from numpy's __config__.py
+do_install:append() {
+    sed -i \
+        -e 's|${S}=||g' \
+        -e 's|${B}=||g' \
+        -e 's|${RECIPE_SYSROOT_NATIVE}=||g' \
+        -e 's|${RECIPE_SYSROOT_NATIVE}||g' \
+        -e 's|${RECIPE_SYSROOT}=||g' \
+        -e 's|${RECIPE_SYSROOT}||g' ${D}${PYTHON_SITEPACKAGES_DIR}/numpy/__config__.py
 
-do_compile:prepend() {
-    export NPY_DISABLE_SVML=1
+    nativepython3 -mcompileall -s ${D} ${D}${PYTHON_SITEPACKAGES_DIR}/numpy/__config__.py
 }
 
-FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a ${PYTHON_SITEPACKAGES_DIR}/numpy/random/lib/*.a"
+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} = "python3-unittest \
@@ -59,7 +68,4 @@ RDEPENDS:${PN}-ptest += "python3-pytest \
                          ldd \
 "
 
-# Upstream has a pyproject.toml but as of 1.26.4 it's marked as experimental
-INSANE_SKIP = "pep517-backend"
-
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.39.5
#2 lore raw

Re: [OE-core][PATCH 2/2] python3-numpy: upgrade 1.26.4 -> 2.1.3

Quoted 63 lines · Trevor Gamblin via lists.openembedded.org

- This release contains numerous API changes and bug fixes.
Changelog: https://github.com/numpy/numpy/releases

- Notably, the build backend has switched to mesonpy since 1.26.4.

- Patch 0001-numpy-core-Define-RISCV-32-support.patch had to be updated to change the paths for the target files. It has now been merged upstream, but isn't included in any release yet. PR for reference:

https://github.com/numpy/numpy/pull/17780

- Builds OK and seems to be compatible with current piglit and pandas (meta-python), which was not the case for the previous upgrade attempt to numpy 2.0.1.

- For numpy, add 'pkgconfig' to inherit to avoid errors like this at do_compile:

  | Found Pkg-config: NO
  | Run-time dependency python found: YES 3.12
  | Has header "Python.h" with dependency python: NO
  |
  | ../numpy-2.0.0/meson.build:44:2: ERROR: Problem encountered: Cannot compile `Python.h`. Perhaps you need to install python-dev|python-devel
  |
  | A full log can be found at /home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.0.0/build/meson-logs/meson-log.txt

- Mmodify the FILES:${PN}-staticdev line to fix a QA issue.

- This is now reproducible as of oe-core commit: 917df5ed022f

License-Update: Change copyright year to 2024

buildall-qemu log:

BUILDALL-QEMU LOG FOR python3-numpy
START TIME: 2024-11-20_14:02:08
HOSTNAME: megalith
HOST OS: Debian GNU/Linux 12 (bookworm)
HOST KERNEL: 6.1.0-27-amd64
===============
BUILD RESULTS:
[glibc]
FAIL: qemuloongarch64
PASS: qemuriscv32
PASS: qemuarmv5
PASS: qemuppc
PASS: qemumips64
PASS: qemuriscv64
PASS: qemuarm64
PASS: qemuarm
PASS: qemux86-64
PASS: qemuppc64
PASS: qemux86
PASS: qemumips
[musl]
FAIL: qemuloongarch64
FAIL: qemuriscv32
PASS: qemuarmv5
PASS: qemuppc
PASS: qemumips64
PASS: qemuriscv64
PASS: qemuarm64

Quoted 8 lines

PASS: qemuarm
PASS: qemux86-64
PASS: qemuppc64
PASS: qemux86
PASS: qemumips
===============
PASSED: 21
FAILED: 3

Testing on such a comprehensive matrix is amazing, thanks for doing it. Can you share more details on qemuriscv32/musl failures ?

Quoted 165 lines
---
 ...1-numpy-core-Define-RISCV-32-support.patch | 52 +++++++++++--------
 ...numpy_1.26.4.bb => python3-numpy_2.1.3.bb} | 26 ++++++----
 2 files changed, 46 insertions(+), 32 deletions(-)
 rename meta/recipes-devtools/python/{python3-numpy_1.26.4.bb => python3-numpy_2.1.3.bb} (68%)
meta/recipes-devtools/python/python3-numpy/0001-numpy-core-Define-RISCV-32-support.patch +30 -22
index 676bdbb3afd..6da9047ec57 100644
@@ -1,42 +1,50 @@
-From eb6d6579150bf4684603ce377c51e90ad3bb8109 Mon Sep 17 00:00:00 2001
+From 0e2b652a0eff85798584116c905a2d6ad8f25d5f Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Sun, 15 Nov 2020 15:32:39 -0800
 Subject: [PATCH] numpy/core: Define RISCV-32 support
 
 Helps compile on riscv32
 
-Upstream-Status: Submitted [https://github.com/numpy/numpy/pull/17780]
+Upstream-Status: Backport
+(https://github.com/numpy/numpy/pull/17780/commits/0e2b652a0eff85798584116c905a2d6ad8f25d5f)
+
 Signed-off-by: Khem Raj <[email protected]>
 ---
- numpy/core/include/numpy/npy_cpu.h    | 3 +++
- numpy/core/include/numpy/npy_endian.h | 1 +
- 2 files changed, 4 insertions(+)
+ numpy/_core/include/numpy/npy_cpu.h    | 9 +++++++--
+ numpy/_core/include/numpy/npy_endian.h | 1 +
+ 2 files changed, 8 insertions(+), 2 deletions(-)
 
-diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h
-index 78d229e..04be511 100644
---- a/numpy/core/include/numpy/npy_cpu.h
-+++ b/numpy/core/include/numpy/npy_cpu.h
-@@ -19,6 +19,7 @@
+diff --git a/numpy/_core/include/numpy/npy_cpu.h b/numpy/_core/include/numpy/npy_cpu.h
+index a19f8e6bbd..15f9f12931 100644
+--- a/numpy/_core/include/numpy/npy_cpu.h
++++ b/numpy/_core/include/numpy/npy_cpu.h
+@@ -18,6 +18,7 @@
+  *              NPY_CPU_ARCEL
   *              NPY_CPU_ARCEB
   *              NPY_CPU_RISCV64
-  *              NPY_CPU_LOONGARCH
 + *              NPY_CPU_RISCV32
+  *              NPY_CPU_LOONGARCH
   *              NPY_CPU_WASM
   */
- #ifndef NUMPY_CORE_INCLUDE_NUMPY_NPY_CPU_H_
-@@ -104,6 +105,8 @@
+@@ -102,8 +103,12 @@
+     #define NPY_CPU_ARCEL
+ #elif defined(__arc__) && defined(__BIG_ENDIAN__)
      #define NPY_CPU_ARCEB
- #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(__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(__loongarch__)
      #define NPY_CPU_LOONGARCH
  #elif defined(__EMSCRIPTEN__)
-diff --git a/numpy/core/include/numpy/npy_endian.h b/numpy/core/include/numpy/npy_endian.h
-index 5e58a7f..0926212 100644
---- a/numpy/core/include/numpy/npy_endian.h
-+++ b/numpy/core/include/numpy/npy_endian.h
+diff --git a/numpy/_core/include/numpy/npy_endian.h b/numpy/_core/include/numpy/npy_endian.h
+index 5e58a7f52c..09262120bf 100644
+--- a/numpy/_core/include/numpy/npy_endian.h
++++ b/numpy/_core/include/numpy/npy_endian.h
 @@ -49,6 +49,7 @@
              || defined(NPY_CPU_PPC64LE)       \
              || defined(NPY_CPU_ARCEL)         \
@@ -46,5 +54,5 @@ index 5e58a7f..0926212 100644
              || defined(NPY_CPU_WASM)
          #define NPY_BYTE_ORDER NPY_LITTLE_ENDIAN
 --
-2.20.1
+2.39.5
 
meta/recipes-devtools/python/python3-numpy_2.1.3.bb renamed from meta/recipes-devtools/python/python3-numpy_1.26.4.bb +16 -11
similarity index 68%
rename from meta/recipes-devtools/python/python3-numpy_1.26.4.bb
rename to meta/recipes-devtools/python/python3-numpy_2.1.3.bb
index fa78b07f48b..da75dff1e04 100644
@@ -3,7 +3,7 @@ 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-2.0 & Apache-2.0 & MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a752eb20459cf74a9d84ee4825e8317c"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1de863c37a83e71b1e97b64d036ea78b"
 
 SRCNAME = "numpy"
 
@@ -13,22 +13,31 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${SRCNAME}-${PV}.tar.gz \
            file://fix_reproducibility.patch \
            file://run-ptest \
            "
-SRC_URI[sha256sum] = "2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010"
+SRC_URI[sha256sum] = "aa08e04e08aaf974d4458def539dece0d28146d866a39da5639596f4921fd761"
 
 GITHUB_BASE_URI = "https://github.com/numpy/numpy/releases"
 UPSTREAM_CHECK_REGEX = "releases/tag/v?(?P<pver>\d+(\.\d+)+)$"
 
-inherit ptest setuptools3 github-releases cython
+inherit ptest python_mesonpy github-releases cython
 
 S = "${WORKDIR}/numpy-${PV}"
 
-CLEANBROKEN = "1"
+# Remove references to buildpaths from numpy's __config__.py
+do_install:append() {
+    sed -i \
+        -e 's|${S}=||g' \
+        -e 's|${B}=||g' \
+        -e 's|${RECIPE_SYSROOT_NATIVE}=||g' \
+        -e 's|${RECIPE_SYSROOT_NATIVE}||g' \
+        -e 's|${RECIPE_SYSROOT}=||g' \
+        -e 's|${RECIPE_SYSROOT}||g' ${D}${PYTHON_SITEPACKAGES_DIR}/numpy/__config__.py
 
-do_compile:prepend() {
-    export NPY_DISABLE_SVML=1
+    nativepython3 -mcompileall -s ${D} ${D}${PYTHON_SITEPACKAGES_DIR}/numpy/__config__.py
 }
 
-FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a ${PYTHON_SITEPACKAGES_DIR}/numpy/random/lib/*.a"
+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} = "python3-unittest \
@@ -59,7 +68,4 @@ RDEPENDS:${PN}-ptest += "python3-pytest \
                          ldd \
 "
 
-# Upstream has a pyproject.toml but as of 1.26.4 it's marked as experimental
-INSANE_SKIP = "pep517-backend"
-
 BBCLASSEXTEND = "native nativesdk"
--

2.39.5

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#207543): https://lists.openembedded.org/g/openembedded-core/message/207543
Mute This Topic: https://lists.openembedded.org/mt/109705562/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#3 lore raw

Re: [OE-core][PATCH 2/2] python3-numpy: upgrade 1.26.4 -> 2.1.3

Quoted 73 lines · Khem Raj
Quoted 62 lines · Trevor Gamblin via lists.openembedded.org

- This release contains numerous API changes and bug fixes.
Changelog: https://github.com/numpy/numpy/releases

- Notably, the build backend has switched to mesonpy since 1.26.4.

- Patch 0001-numpy-core-Define-RISCV-32-support.patch had to be updated to change the paths for the target files. It has now been merged upstream, but isn't included in any release yet. PR for reference:

   https://github.com/numpy/numpy/pull/17780

- Builds OK and seems to be compatible with current piglit and pandas (meta-python), which was not the case for the previous upgrade attempt to numpy 2.0.1.

- For numpy, add 'pkgconfig' to inherit to avoid errors like this at do_compile:

   | Found Pkg-config: NO
   | Run-time dependency python found: YES 3.12
   | Has header "Python.h" with dependency python: NO
   |
   | ../numpy-2.0.0/meson.build:44:2: ERROR: Problem encountered: Cannot compile `Python.h`. Perhaps you need to install python-dev|python-devel
   |
   | A full log can be found at /home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.0.0/build/meson-logs/meson-log.txt

- Mmodify the FILES:${PN}-staticdev line to fix a QA issue.

- This is now reproducible as of oe-core commit: 917df5ed022f

License-Update: Change copyright year to 2024

buildall-qemu log:

BUILDALL-QEMU LOG FOR python3-numpy
START TIME: 2024-11-20_14:02:08
HOSTNAME: megalith
HOST OS: Debian GNU/Linux 12 (bookworm)
HOST KERNEL: 6.1.0-27-amd64
===============
BUILD RESULTS:
[glibc]
FAIL: qemuloongarch64
PASS: qemuriscv32
PASS: qemuarmv5
PASS: qemuppc
PASS: qemumips64
PASS: qemuriscv64
PASS: qemuarm64
PASS: qemuarm
PASS: qemux86-64
PASS: qemuppc64
PASS: qemux86
PASS: qemumips
[musl]
FAIL: qemuloongarch64
FAIL: qemuriscv32
PASS: qemuarmv5
PASS: qemuppc
PASS: qemumips64
PASS: qemuriscv64
PASS: qemuarm64

Quoted 8 lines

PASS: qemuarm
PASS: qemux86-64
PASS: qemuppc64
PASS: qemux86
PASS: qemumips
===============
PASSED: 21
FAILED: 3

Quoted 2 lines

Testing on such a comprehensive matrix is amazing, thanks for doing it. Can you share more details on qemuriscv32/musl failures ?

This was the error I saw when I went and checked the build with TCLIBC=musl, MACHINE=qemuriscv32:

ERROR: Nothing PROVIDES 'virtual/libc' (but /home/tgamblin/workspace/yocto/poky/meta/recipes-devtools/python/python3-numpy_2.1.3.bb, /home/tgamblin/workspace/yocto/poky/meta/recipes-devtools/gcc/gcc-runtime_14.2.bb, /home/tgamblin/workspace/yocto/poky/m) picolibc PROVIDES virtual/libc but was skipped: incompatible with host riscv32-poky-linux-musl (not in COMPATIBLE_HOST)
nativesdk-glibc-y2038-tests PROVIDES virtual/libc but was skipped: glibc-testsuite requires that virtual/libc is glibc
glibc-y2038-tests PROVIDES virtual/libc but was skipped: incompatible with host riscv32-poky-linux-musl (not in COMPATIBLE_HOST)
newlib PROVIDES virtual/libc but was skipped: incompatible with host riscv32-poky-linux-musl (not in COMPATIBLE_HOST)
glibc PROVIDES virtual/libc but was skipped: incompatible with host riscv32-poky-linux-musl (not in COMPATIBLE_HOST)
musl PROVIDES virtual/libc but was skipped: incompatible with host riscv32-poky-linux-musl (not in COMPATIBLE_HOST)
ERROR: Required build target 'python3-numpy' has no buildable providers.
Missing or unbuildable dependency chain was: ['python3-numpy', 'virtual/libc']

Quoted 165 lines
Quoted 165 lines
---
  ...1-numpy-core-Define-RISCV-32-support.patch | 52 +++++++++++--------
  ...numpy_1.26.4.bb => python3-numpy_2.1.3.bb} | 26 ++++++----
  2 files changed, 46 insertions(+), 32 deletions(-)

rename meta/recipes-devtools/python/{python3-numpy_1.26.4.bb => python3-numpy_2.1.3.bb} (68%)

meta/recipes-devtools/python/python3-numpy/0001-numpy-core-Define-RISCV-32-support.patch +30 -22
index 676bdbb3afd..6da9047ec57 100644
@@ -1,42 +1,50 @@
-From eb6d6579150bf4684603ce377c51e90ad3bb8109 Mon Sep 17 00:00:00 2001
+From 0e2b652a0eff85798584116c905a2d6ad8f25d5f Mon Sep 17 00:00:00 2001
  From: Khem Raj <[email protected]>
  Date: Sun, 15 Nov 2020 15:32:39 -0800
  Subject: [PATCH] numpy/core: Define RISCV-32 support
 
  Helps compile on riscv32
 
-Upstream-Status: Submitted [https://github.com/numpy/numpy/pull/17780]
+Upstream-Status: Backport
+(https://github.com/numpy/numpy/pull/17780/commits/0e2b652a0eff85798584116c905a2d6ad8f25d5f)
+
  Signed-off-by: Khem Raj <[email protected]>
  ---
- numpy/core/include/numpy/npy_cpu.h    | 3 +++
- numpy/core/include/numpy/npy_endian.h | 1 +
- 2 files changed, 4 insertions(+)
+ numpy/_core/include/numpy/npy_cpu.h    | 9 +++++++--
+ numpy/_core/include/numpy/npy_endian.h | 1 +
+ 2 files changed, 8 insertions(+), 2 deletions(-)
 
-diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h
-index 78d229e..04be511 100644
---- a/numpy/core/include/numpy/npy_cpu.h
-+++ b/numpy/core/include/numpy/npy_cpu.h
-@@ -19,6 +19,7 @@
+diff --git a/numpy/_core/include/numpy/npy_cpu.h b/numpy/_core/include/numpy/npy_cpu.h
+index a19f8e6bbd..15f9f12931 100644
+--- a/numpy/_core/include/numpy/npy_cpu.h
++++ b/numpy/_core/include/numpy/npy_cpu.h
+@@ -18,6 +18,7 @@
+  *              NPY_CPU_ARCEL
    *              NPY_CPU_ARCEB
    *              NPY_CPU_RISCV64
-  *              NPY_CPU_LOONGARCH
  + *              NPY_CPU_RISCV32
+  *              NPY_CPU_LOONGARCH
    *              NPY_CPU_WASM
    */
- #ifndef NUMPY_CORE_INCLUDE_NUMPY_NPY_CPU_H_
-@@ -104,6 +105,8 @@
+@@ -102,8 +103,12 @@
+     #define NPY_CPU_ARCEL
+ #elif defined(__arc__) && defined(__BIG_ENDIAN__)
       #define NPY_CPU_ARCEB
- #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(__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(__loongarch__)
       #define NPY_CPU_LOONGARCH
   #elif defined(__EMSCRIPTEN__)
-diff --git a/numpy/core/include/numpy/npy_endian.h b/numpy/core/include/numpy/npy_endian.h
-index 5e58a7f..0926212 100644
---- a/numpy/core/include/numpy/npy_endian.h
-+++ b/numpy/core/include/numpy/npy_endian.h
+diff --git a/numpy/_core/include/numpy/npy_endian.h b/numpy/_core/include/numpy/npy_endian.h
+index 5e58a7f52c..09262120bf 100644
+--- a/numpy/_core/include/numpy/npy_endian.h
++++ b/numpy/_core/include/numpy/npy_endian.h
  @@ -49,6 +49,7 @@
               || defined(NPY_CPU_PPC64LE)       \
               || defined(NPY_CPU_ARCEL)         \
@@ -46,5 +54,5 @@ index 5e58a7f..0926212 100644
               || defined(NPY_CPU_WASM)
           #define NPY_BYTE_ORDER NPY_LITTLE_ENDIAN
  --
-2.20.1
+2.39.5
 
meta/recipes-devtools/python/python3-numpy_2.1.3.bb renamed from meta/recipes-devtools/python/python3-numpy_1.26.4.bb +16 -11
similarity index 68%
rename from meta/recipes-devtools/python/python3-numpy_1.26.4.bb
rename to meta/recipes-devtools/python/python3-numpy_2.1.3.bb
index fa78b07f48b..da75dff1e04 100644
@@ -3,7 +3,7 @@ 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-2.0 & Apache-2.0 & MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a752eb20459cf74a9d84ee4825e8317c"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1de863c37a83e71b1e97b64d036ea78b"
 
  SRCNAME = "numpy"
 
@@ -13,22 +13,31 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${SRCNAME}-${PV}.tar.gz \
             file://fix_reproducibility.patch \
             file://run-ptest \
             "
-SRC_URI[sha256sum] = "2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010"
+SRC_URI[sha256sum] = "aa08e04e08aaf974d4458def539dece0d28146d866a39da5639596f4921fd761"
 
  GITHUB_BASE_URI = "https://github.com/numpy/numpy/releases"
  UPSTREAM_CHECK_REGEX = "releases/tag/v?(?P<pver>\d+(\.\d+)+)$"
 
-inherit ptest setuptools3 github-releases cython
+inherit ptest python_mesonpy github-releases cython
 
  S = "${WORKDIR}/numpy-${PV}"
 
-CLEANBROKEN = "1"
+# Remove references to buildpaths from numpy's __config__.py
+do_install:append() {
+    sed -i \
+        -e 's|${S}=||g' \
+        -e 's|${B}=||g' \
+        -e 's|${RECIPE_SYSROOT_NATIVE}=||g' \
+        -e 's|${RECIPE_SYSROOT_NATIVE}||g' \
+        -e 's|${RECIPE_SYSROOT}=||g' \
+        -e 's|${RECIPE_SYSROOT}||g' ${D}${PYTHON_SITEPACKAGES_DIR}/numpy/__config__.py
 
-do_compile:prepend() {
-    export NPY_DISABLE_SVML=1
+    nativepython3 -mcompileall -s ${D} ${D}${PYTHON_SITEPACKAGES_DIR}/numpy/__config__.py
  }
 
-FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a ${PYTHON_SITEPACKAGES_DIR}/numpy/random/lib/*.a"
+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} = "python3-unittest \
@@ -59,7 +68,4 @@ RDEPENDS:${PN}-ptest += "python3-pytest \
                           ldd \
  "
 
-# Upstream has a pyproject.toml but as of 1.26.4 it's marked as experimental
-INSANE_SKIP = "pep517-backend"
-
  BBCLASSEXTEND = "native nativesdk"
--

2.39.5

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#207543): https://lists.openembedded.org/g/openembedded-core/message/207543
Mute This Topic: https://lists.openembedded.org/mt/109705562/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#4 lore raw

Re: [OE-core][PATCH 2/2] python3-numpy: upgrade 1.26.4 -> 2.1.3

ah that makes sense.

Quoted 267 lines · Trevor Gamblin
Quoted 73 lines · Khem Raj
Quoted 62 lines · Trevor Gamblin via lists.openembedded.org

- This release contains numerous API changes and bug fixes.
Changelog: https://github.com/numpy/numpy/releases

- Notably, the build backend has switched to mesonpy since 1.26.4.

- Patch 0001-numpy-core-Define-RISCV-32-support.patch had to be updated to change the paths for the target files. It has now been merged upstream, but isn't included in any release yet. PR for reference:

   https://github.com/numpy/numpy/pull/17780

- Builds OK and seems to be compatible with current piglit and pandas (meta-python), which was not the case for the previous upgrade attempt to numpy 2.0.1.

- For numpy, add 'pkgconfig' to inherit to avoid errors like this at do_compile:

   | Found Pkg-config: NO
   | Run-time dependency python found: YES 3.12
   | Has header "Python.h" with dependency python: NO
   |
   | ../numpy-2.0.0/meson.build:44:2: ERROR: Problem encountered: Cannot compile `Python.h`. Perhaps you need to install python-dev|python-devel
   |
   | A full log can be found at /home/tgamblin/workspace/yocto/poky/build/tmp/work/core2-64-poky-linux/python3-numpy/2.0.0/build/meson-logs/meson-log.txt

- Mmodify the FILES:${PN}-staticdev line to fix a QA issue.

- This is now reproducible as of oe-core commit: 917df5ed022f

License-Update: Change copyright year to 2024

buildall-qemu log:

BUILDALL-QEMU LOG FOR python3-numpy
START TIME: 2024-11-20_14:02:08
HOSTNAME: megalith
HOST OS: Debian GNU/Linux 12 (bookworm)
HOST KERNEL: 6.1.0-27-amd64
===============
BUILD RESULTS:
[glibc]
FAIL: qemuloongarch64
PASS: qemuriscv32
PASS: qemuarmv5
PASS: qemuppc
PASS: qemumips64
PASS: qemuriscv64
PASS: qemuarm64
PASS: qemuarm
PASS: qemux86-64
PASS: qemuppc64
PASS: qemux86
PASS: qemumips
[musl]
FAIL: qemuloongarch64
FAIL: qemuriscv32
PASS: qemuarmv5
PASS: qemuppc
PASS: qemumips64
PASS: qemuriscv64
PASS: qemuarm64

Quoted 8 lines

PASS: qemuarm
PASS: qemux86-64
PASS: qemuppc64
PASS: qemux86
PASS: qemumips
===============
PASSED: 21
FAILED: 3

Quoted 2 lines

Testing on such a comprehensive matrix is amazing, thanks for doing it. Can you share more details on qemuriscv32/musl failures ?

This was the error I saw when I went and checked the build with TCLIBC=musl, MACHINE=qemuriscv32:

ERROR: Nothing PROVIDES 'virtual/libc' (but /home/tgamblin/workspace/yocto/poky/meta/recipes-devtools/python/python3-numpy_2.1.3.bb, /home/tgamblin/workspace/yocto/poky/meta/recipes-devtools/gcc/gcc-runtime_14.2.bb, /home/tgamblin/workspace/yocto/poky/m)
picolibc PROVIDES virtual/libc but was skipped: incompatible with host riscv32-poky-linux-musl (not in COMPATIBLE_HOST) nativesdk-glibc-y2038-tests PROVIDES virtual/libc but was skipped:
glibc-testsuite requires that virtual/libc is glibc
glibc-y2038-tests PROVIDES virtual/libc but was skipped: incompatible
with host riscv32-poky-linux-musl (not in COMPATIBLE_HOST)
newlib PROVIDES virtual/libc but was skipped: incompatible with host riscv32-poky-linux-musl (not in COMPATIBLE_HOST)
glibc PROVIDES virtual/libc but was skipped: incompatible with host riscv32-poky-linux-musl (not in COMPATIBLE_HOST)
musl PROVIDES virtual/libc but was skipped: incompatible with host riscv32-poky-linux-musl (not in COMPATIBLE_HOST)
ERROR: Required build target 'python3-numpy' has no buildable providers. Missing or unbuildable dependency chain was: ['python3-numpy', 'virtual/libc']

Quoted 165 lines
Quoted 165 lines
---
  ...1-numpy-core-Define-RISCV-32-support.patch | 52 +++++++++++--------
  ...numpy_1.26.4.bb => python3-numpy_2.1.3.bb} | 26 ++++++----
  2 files changed, 46 insertions(+), 32 deletions(-)

rename meta/recipes-devtools/python/{python3-numpy_1.26.4.bb => python3-numpy_2.1.3.bb} (68%)

meta/recipes-devtools/python/python3-numpy/0001-numpy-core-Define-RISCV-32-support.patch +30 -22
index 676bdbb3afd..6da9047ec57 100644
@@ -1,42 +1,50 @@
-From eb6d6579150bf4684603ce377c51e90ad3bb8109 Mon Sep 17 00:00:00 2001
+From 0e2b652a0eff85798584116c905a2d6ad8f25d5f Mon Sep 17 00:00:00 2001
  From: Khem Raj <[email protected]>
  Date: Sun, 15 Nov 2020 15:32:39 -0800
  Subject: [PATCH] numpy/core: Define RISCV-32 support
 
  Helps compile on riscv32
 
-Upstream-Status: Submitted [https://github.com/numpy/numpy/pull/17780]
+Upstream-Status: Backport
+(https://github.com/numpy/numpy/pull/17780/commits/0e2b652a0eff85798584116c905a2d6ad8f25d5f)
+
  Signed-off-by: Khem Raj <[email protected]>
  ---
- numpy/core/include/numpy/npy_cpu.h    | 3 +++
- numpy/core/include/numpy/npy_endian.h | 1 +
- 2 files changed, 4 insertions(+)
+ numpy/_core/include/numpy/npy_cpu.h    | 9 +++++++--
+ numpy/_core/include/numpy/npy_endian.h | 1 +
+ 2 files changed, 8 insertions(+), 2 deletions(-)
 
-diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h
-index 78d229e..04be511 100644
---- a/numpy/core/include/numpy/npy_cpu.h
-+++ b/numpy/core/include/numpy/npy_cpu.h
-@@ -19,6 +19,7 @@
+diff --git a/numpy/_core/include/numpy/npy_cpu.h b/numpy/_core/include/numpy/npy_cpu.h
+index a19f8e6bbd..15f9f12931 100644
+--- a/numpy/_core/include/numpy/npy_cpu.h
++++ b/numpy/_core/include/numpy/npy_cpu.h
+@@ -18,6 +18,7 @@
+  *              NPY_CPU_ARCEL
    *              NPY_CPU_ARCEB
    *              NPY_CPU_RISCV64
-  *              NPY_CPU_LOONGARCH
  + *              NPY_CPU_RISCV32
+  *              NPY_CPU_LOONGARCH
    *              NPY_CPU_WASM
    */
- #ifndef NUMPY_CORE_INCLUDE_NUMPY_NPY_CPU_H_
-@@ -104,6 +105,8 @@
+@@ -102,8 +103,12 @@
+     #define NPY_CPU_ARCEL
+ #elif defined(__arc__) && defined(__BIG_ENDIAN__)
       #define NPY_CPU_ARCEB
- #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(__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(__loongarch__)
       #define NPY_CPU_LOONGARCH
   #elif defined(__EMSCRIPTEN__)
-diff --git a/numpy/core/include/numpy/npy_endian.h b/numpy/core/include/numpy/npy_endian.h
-index 5e58a7f..0926212 100644
---- a/numpy/core/include/numpy/npy_endian.h
-+++ b/numpy/core/include/numpy/npy_endian.h
+diff --git a/numpy/_core/include/numpy/npy_endian.h b/numpy/_core/include/numpy/npy_endian.h
+index 5e58a7f52c..09262120bf 100644
+--- a/numpy/_core/include/numpy/npy_endian.h
++++ b/numpy/_core/include/numpy/npy_endian.h
  @@ -49,6 +49,7 @@
               || defined(NPY_CPU_PPC64LE)       \
               || defined(NPY_CPU_ARCEL)         \
@@ -46,5 +54,5 @@ index 5e58a7f..0926212 100644
               || defined(NPY_CPU_WASM)
           #define NPY_BYTE_ORDER NPY_LITTLE_ENDIAN
  --
-2.20.1
+2.39.5
 
meta/recipes-devtools/python/python3-numpy_2.1.3.bb renamed from meta/recipes-devtools/python/python3-numpy_1.26.4.bb +16 -11
similarity index 68%
rename from meta/recipes-devtools/python/python3-numpy_1.26.4.bb
rename to meta/recipes-devtools/python/python3-numpy_2.1.3.bb
index fa78b07f48b..da75dff1e04 100644
@@ -3,7 +3,7 @@ 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-2.0 & Apache-2.0 & MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a752eb20459cf74a9d84ee4825e8317c"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1de863c37a83e71b1e97b64d036ea78b"
 
  SRCNAME = "numpy"
 
@@ -13,22 +13,31 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${SRCNAME}-${PV}.tar.gz \
             file://fix_reproducibility.patch \
             file://run-ptest \
             "
-SRC_URI[sha256sum] = "2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010"
+SRC_URI[sha256sum] = "aa08e04e08aaf974d4458def539dece0d28146d866a39da5639596f4921fd761"
 
  GITHUB_BASE_URI = "https://github.com/numpy/numpy/releases"
  UPSTREAM_CHECK_REGEX = "releases/tag/v?(?P<pver>\d+(\.\d+)+)$"
 
-inherit ptest setuptools3 github-releases cython
+inherit ptest python_mesonpy github-releases cython
 
  S = "${WORKDIR}/numpy-${PV}"
 
-CLEANBROKEN = "1"
+# Remove references to buildpaths from numpy's __config__.py
+do_install:append() {
+    sed -i \
+        -e 's|${S}=||g' \
+        -e 's|${B}=||g' \
+        -e 's|${RECIPE_SYSROOT_NATIVE}=||g' \
+        -e 's|${RECIPE_SYSROOT_NATIVE}||g' \
+        -e 's|${RECIPE_SYSROOT}=||g' \
+        -e 's|${RECIPE_SYSROOT}||g' ${D}${PYTHON_SITEPACKAGES_DIR}/numpy/__config__.py
 
-do_compile:prepend() {
-    export NPY_DISABLE_SVML=1
+    nativepython3 -mcompileall -s ${D} ${D}${PYTHON_SITEPACKAGES_DIR}/numpy/__config__.py
  }
 
-FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a ${PYTHON_SITEPACKAGES_DIR}/numpy/random/lib/*.a"
+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} = "python3-unittest \
@@ -59,7 +68,4 @@ RDEPENDS:${PN}-ptest += "python3-pytest \
                           ldd \
  "
 
-# Upstream has a pyproject.toml but as of 1.26.4 it's marked as experimental
-INSANE_SKIP = "pep517-backend"
-
  BBCLASSEXTEND = "native nativesdk"
--

2.39.5

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#207543): https://lists.openembedded.org/g/openembedded-core/message/207543
Mute This Topic: https://lists.openembedded.org/mt/109705562/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-