diff mbox series

[meta-python,2/2] python3-nanobind: Fix build

Message ID 20251112095221.587048-2-zboszor@gmail.com
State New
Headers show
Series [meta-python,1/2] python3-scikit-build-core: Use cmake from PATH | expand

Commit Message

Zoltán Böszörményi Nov. 12, 2025, 9:52 a.m. UTC
Fix the order of inherited classes, so the nanobuild python module
actually gets built.

Also, put the cmake files into the correct location, i.e.
  ${libdir}/cmake/nanobind
instead of
  ${base_libdir}/cmake/python3-nanobind

onnx 1.20.0rc1 uses nanobind and during its build it detects the
presence of the python module, and wants to use the nanobind cmake
module, both of which fail.

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
---
 .../recipes-devtools/python/python3-nanobind_2.9.2.bb     | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-nanobind_2.9.2.bb b/meta-python/recipes-devtools/python/python3-nanobind_2.9.2.bb
index 85105fd196..a70ad2ae18 100644
--- a/meta-python/recipes-devtools/python/python3-nanobind_2.9.2.bb
+++ b/meta-python/recipes-devtools/python/python3-nanobind_2.9.2.bb
@@ -6,7 +6,9 @@  LIC_FILES_CHKSUM = "file://LICENSE;md5=7646f9ee25e49eaf53f89a10665c568c"
 
 SRC_URI[sha256sum] = "e7608472de99d375759814cab3e2c94aba3f9ec80e62cfef8ced495ca5c27d6e"
 
-inherit pypi python_setuptools_build_meta cmake lib_package
+DEPENDS = "python3-cmake-native"
+
+inherit pypi cmake python_setuptools_build_meta
 
 EXTRA_OECMAKE += "-DNB_TEST=OFF"
 
@@ -17,8 +19,8 @@  DEPENDS += "\
 "
 
 do_install:append() {
-    install -d ${D}${base_libdir}/cmake/${PN}
-    install -m 0644 ${S}/cmake/* ${D}${base_libdir}/cmake/${PN}/
+    install -d ${D}${libdir}/cmake/${PYPI_PACKAGE}
+    install -m 0644 ${S}/cmake/* ${D}${libdir}/cmake/${PYPI_PACKAGE}/
 }
 
 FILES:${PN} += "${prefix_native}/* ${prefix_native}/${PN}/* ${base_libdir}/cmake/*"