Skip to content

Commit bc4b662

Browse files
committed
Add python3-nanobind backport
1 parent bb6f4c6 commit bc4b662

File tree

6 files changed

+84
-0
lines changed

6 files changed

+84
-0
lines changed

.oelint-ignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
# Backports from newer Yocto releases
22
meta-protos/meta-python/recipes-core/python/python3-uinput/
3+
meta-protos/meta-python/recipes-devtools/python3-nanobind/
4+
meta-protos/meta-python/recipes-devtools/python3-scikit-build-core/
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Backport
2+
3+
Available with *meta-python / master*.
4+
5+
Upstream revision: `74b733358cf94803ff98ecd19d90d0e176be4e71`
6+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
SUMMARY = "nanobind: tiny and efficient C++/Python bindings"
2+
DESCRIPTION = "nanobind: tiny and efficient C++/Python bindings"
3+
HOMEPAGE = "https://github.com/wjakob/nanobind"
4+
LICENSE = "BSD-3-Clause"
5+
LIC_FILES_CHKSUM = "file://LICENSE;md5=7646f9ee25e49eaf53f89a10665c568c"
6+
7+
SRC_URI[sha256sum] = "e05c6816a844aa699e46408add3bff8c743af9fd3d38eafa307a73633fddf94e"
8+
9+
inherit pypi python_setuptools_build_meta cmake lib_package
10+
11+
EXTRA_OECMAKE += "-DNB_TEST=OFF"
12+
13+
DEPENDS += "\
14+
python3-scikit-build-native \
15+
python3-scikit-build-core-native \
16+
ninja-native \
17+
"
18+
19+
do_install:append() {
20+
install -d ${D}${base_libdir}/cmake/${PN}
21+
install -m 0644 ${S}/cmake/* ${D}${base_libdir}/cmake/${PN}/
22+
}
23+
24+
FILES:${PN} += "${prefix_native}/* ${prefix_native}/${PN}/* ${base_libdir}/cmake/*"
25+
26+
BBCLASSEXTEND = "native nativesdk"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Backport
2+
3+
Available with *meta-python / master*.
4+
5+
Upstream revision: `28295bfd591a3d00f706894e01b4f252ee2e1c0a`
6+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From 3f5d2be717d200406126537eb2f3ed4de92bd2c1 Mon Sep 17 00:00:00 2001
2+
From: Leon Anavi <leon.anavi@konsulko.com>
3+
Date: Mon, 27 Jan 2025 19:17:48 +0200
4+
Subject: [PATCH] builder.py: Check PYTHON_INCLUDE_DIR
5+
6+
Use PYTHON_INCLUDE_DIR to find Python Interpreter and
7+
Development.Module.
8+
9+
Upstream-Status: Inappropriate [oe specific]
10+
11+
Suggested-by: Stephan Kulow <stephan.kulow@siemens.com>
12+
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
13+
---
14+
src/scikit_build_core/builder/builder.py | 2 +-
15+
1 file changed, 1 insertion(+), 1 deletion(-)
16+
17+
diff --git a/src/scikit_build_core/builder/builder.py b/src/scikit_build_core/builder/builder.py
18+
index 532d328..0c99ef3 100644
19+
--- a/src/scikit_build_core/builder/builder.py
20+
+++ b/src/scikit_build_core/builder/builder.py
21+
@@ -228,7 +228,7 @@ class Builder:
22+
python_sabi_library = (
23+
get_python_library(self.config.env, abi3=True) if limited_api else None
24+
)
25+
- python_include_dir = get_python_include_dir()
26+
+ python_include_dir = os.getenv("PYTHON_INCLUDE_DIR") or get_python_include_dir()
27+
numpy_include_dir = get_numpy_include_dir()
28+
29+
# Classic Find Python
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
SUMMARY = "Build backend for CMake based projects"
2+
LICENSE = "Apache-2.0"
3+
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b4e748e5f102e31c9390dcd6fa66f09"
4+
5+
PYPI_PACKAGE = "scikit_build_core"
6+
UPSTREAM_CHECK_PYPI_PACKAGE = "${PYPI_PACKAGE}"
7+
8+
DEPENDS = "python3-hatch-vcs-native"
9+
10+
inherit pypi python_hatchling
11+
12+
SRC_URI += "file://0001-builder.py-Check-PYTHON_INCLUDE_DIR.patch"
13+
SRC_URI[sha256sum] = "4e5988df5cd33f0bdb9967b72663ca99f50383c9bc21d8b24fa40c0661ae72b7"
14+
15+
BBCLASSEXTEND = "native nativesdk"

0 commit comments

Comments
 (0)