@@ -1,4 +1,4 @@
-From 0aee90d953406414f09740a6ef851ed7e666dc9e Mon Sep 17 00:00:00 2001
+From 7aa7a9be9c1d7906b9d4e8f89c078887e8dc5bfc Mon Sep 17 00:00:00 2001
From: Leon Anavi <leon.anavi@konsulko.com>
Date: Mon, 27 Jan 2025 19:17:48 +0200
Subject: [PATCH] builder.py: Check PYTHON_INCLUDE_DIR
@@ -15,15 +15,18 @@ Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/scikit_build_core/builder/builder.py b/src/scikit_build_core/builder/builder.py
-index d05065f..b01d621 100644
+index 4be0cca..0fc54f4 100644
--- a/src/scikit_build_core/builder/builder.py
+++ b/src/scikit_build_core/builder/builder.py
-@@ -228,7 +228,7 @@ class Builder:
- python_sabi_library = (
- get_python_library(self.config.env, abi3=True) if limited_api else None
- )
+@@ -395,7 +395,7 @@ class Builder:
+ python_sabi_library = get_python_library(self.config.env, abi3t=True)
+ elif sabi == _SabiMode.ABI3:
+ python_sabi_library = get_python_library(self.config.env, abi3=True)
- python_include_dir = get_python_include_dir()
+ python_include_dir = os.getenv("PYTHON_INCLUDE_DIR") or get_python_include_dir()
numpy_include_dir = get_numpy_include_dir()
# Warning for CPython 3.13.4 Windows bug
+--
+2.47.3
+
new file mode 100644
@@ -0,0 +1,107 @@
+From 8223ad7e5606174ac0ff47068cd22776a499854c Mon Sep 17 00:00:00 2001
+From: Leon Anavi <leon.anavi@konsulko.com>
+Date: Fri, 17 Jul 2026 14:40:58 +0300
+Subject: [PATCH] src/scikit_build_core: Don't use ${module}
+
+Replace ${module} with __module__ and renmame the the placeholder
+directories to avoid the following bitbake error:
+
+ERROR: Directory name ${module} contains unexpanded bitbake variable.
+This may cause build failures and WORKDIR polution.
+
+Upstream-Status: Inappropriate [oe-specific]
+
+Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
+---
+ src/scikit_build_core/init/__main__.py | 11 +++++++++--
+ .../abi3/src/{${module} => __module__}/_core.c | 0
+ .../abi3t/src/{${module} => __module__}/_core.c | 0
+ .../templates/c/src/{${module} => __module__}/_core.c | 0
+ .../src/{${module} => __module__}/__init__.py.in | 0
+ .../cython/src/{${module} => __module__}/_core.pyx | 0
+ .../fortran/src/{${module} => __module__}/_core.f | 0
+ .../nanobind/src/{${module} => __module__}/_core.cpp | 0
+ .../pybind11/src/{${module} => __module__}/_core.cpp | 0
+ .../swig/src/{${module} => __module__}/_core.c | 0
+ .../swig/src/{${module} => __module__}/_core.i | 0
+ 11 files changed, 9 insertions(+), 2 deletions(-)
+ rename src/scikit_build_core/resources/templates/abi3/src/{${module} => __module__}/_core.c (100%)
+ rename src/scikit_build_core/resources/templates/abi3t/src/{${module} => __module__}/_core.c (100%)
+ rename src/scikit_build_core/resources/templates/c/src/{${module} => __module__}/_core.c (100%)
+ rename src/scikit_build_core/resources/templates/common/src/{${module} => __module__}/__init__.py.in (100%)
+ rename src/scikit_build_core/resources/templates/cython/src/{${module} => __module__}/_core.pyx (100%)
+ rename src/scikit_build_core/resources/templates/fortran/src/{${module} => __module__}/_core.f (100%)
+ rename src/scikit_build_core/resources/templates/nanobind/src/{${module} => __module__}/_core.cpp (100%)
+ rename src/scikit_build_core/resources/templates/pybind11/src/{${module} => __module__}/_core.cpp (100%)
+ rename src/scikit_build_core/resources/templates/swig/src/{${module} => __module__}/_core.c (100%)
+ rename src/scikit_build_core/resources/templates/swig/src/{${module} => __module__}/_core.i (100%)
+
+diff --git a/src/scikit_build_core/init/__main__.py b/src/scikit_build_core/init/__main__.py
+index 1d213fe..36f4db5 100644
+--- a/src/scikit_build_core/init/__main__.py
++++ b/src/scikit_build_core/init/__main__.py
+@@ -103,12 +103,19 @@ def _generate(
+
+ written: list[Path] = []
+ for root in (resources / "templates" / "common", resources / "templates" / backend):
+- # Walk the tree; path components are templated too (e.g. ``${module}``).
++ # Walk the tree and process the templated path components for
++ # __module__ that has replaced ${module} to avoid the following
++ # bitbake error:
++ # ${module} contains unexpanded bitbake variable.
++ # This may cause build failures and WORKDIR polution.
+ stack = [(root, Path())]
+ while stack:
+ node, rel = stack.pop()
+ for entry in node.iterdir():
+- name = string.Template(entry.name).safe_substitute(substitutions)
++ if entry.name == "__module__":
++ name = module
++ else:
++ name = string.Template(entry.name).safe_substitute(substitutions)
+ if entry.is_dir():
+ stack.append((entry, rel / name))
+ continue
+diff --git a/src/scikit_build_core/resources/templates/abi3/src/${module}/_core.c b/src/scikit_build_core/resources/templates/abi3/src/__module__/_core.c
+similarity index 100%
+rename from src/scikit_build_core/resources/templates/abi3/src/${module}/_core.c
+rename to src/scikit_build_core/resources/templates/abi3/src/__module__/_core.c
+diff --git a/src/scikit_build_core/resources/templates/abi3t/src/${module}/_core.c b/src/scikit_build_core/resources/templates/abi3t/src/__module__/_core.c
+similarity index 100%
+rename from src/scikit_build_core/resources/templates/abi3t/src/${module}/_core.c
+rename to src/scikit_build_core/resources/templates/abi3t/src/__module__/_core.c
+diff --git a/src/scikit_build_core/resources/templates/c/src/${module}/_core.c b/src/scikit_build_core/resources/templates/c/src/__module__/_core.c
+similarity index 100%
+rename from src/scikit_build_core/resources/templates/c/src/${module}/_core.c
+rename to src/scikit_build_core/resources/templates/c/src/__module__/_core.c
+diff --git a/src/scikit_build_core/resources/templates/common/src/${module}/__init__.py.in b/src/scikit_build_core/resources/templates/common/src/__module__/__init__.py.in
+similarity index 100%
+rename from src/scikit_build_core/resources/templates/common/src/${module}/__init__.py.in
+rename to src/scikit_build_core/resources/templates/common/src/__module__/__init__.py.in
+diff --git a/src/scikit_build_core/resources/templates/cython/src/${module}/_core.pyx b/src/scikit_build_core/resources/templates/cython/src/__module__/_core.pyx
+similarity index 100%
+rename from src/scikit_build_core/resources/templates/cython/src/${module}/_core.pyx
+rename to src/scikit_build_core/resources/templates/cython/src/__module__/_core.pyx
+diff --git a/src/scikit_build_core/resources/templates/fortran/src/${module}/_core.f b/src/scikit_build_core/resources/templates/fortran/src/__module__/_core.f
+similarity index 100%
+rename from src/scikit_build_core/resources/templates/fortran/src/${module}/_core.f
+rename to src/scikit_build_core/resources/templates/fortran/src/__module__/_core.f
+diff --git a/src/scikit_build_core/resources/templates/nanobind/src/${module}/_core.cpp b/src/scikit_build_core/resources/templates/nanobind/src/__module__/_core.cpp
+similarity index 100%
+rename from src/scikit_build_core/resources/templates/nanobind/src/${module}/_core.cpp
+rename to src/scikit_build_core/resources/templates/nanobind/src/__module__/_core.cpp
+diff --git a/src/scikit_build_core/resources/templates/pybind11/src/${module}/_core.cpp b/src/scikit_build_core/resources/templates/pybind11/src/__module__/_core.cpp
+similarity index 100%
+rename from src/scikit_build_core/resources/templates/pybind11/src/${module}/_core.cpp
+rename to src/scikit_build_core/resources/templates/pybind11/src/__module__/_core.cpp
+diff --git a/src/scikit_build_core/resources/templates/swig/src/${module}/_core.c b/src/scikit_build_core/resources/templates/swig/src/__module__/_core.c
+similarity index 100%
+rename from src/scikit_build_core/resources/templates/swig/src/${module}/_core.c
+rename to src/scikit_build_core/resources/templates/swig/src/__module__/_core.c
+diff --git a/src/scikit_build_core/resources/templates/swig/src/${module}/_core.i b/src/scikit_build_core/resources/templates/swig/src/__module__/_core.i
+similarity index 100%
+rename from src/scikit_build_core/resources/templates/swig/src/${module}/_core.i
+rename to src/scikit_build_core/resources/templates/swig/src/__module__/_core.i
+--
+2.43.0
+
similarity index 76%
rename from meta-python/recipes-devtools/python/python3-scikit-build-core_0.12.2.bb
rename to meta-python/recipes-devtools/python/python3-scikit-build-core_1.0.3.bb
@@ -12,7 +12,8 @@ inherit pypi python_hatchling
SRC_URI += " \
file://0001-builder.py-Check-PYTHON_INCLUDE_DIR.patch \
file://0001-Find-cmake-from-PATH-instead-of-CMAKE_BIN_DIR.patch \
+ file://0001-src-scikit_build_core-Don-t-use-module.patch \
"
-SRC_URI[sha256sum] = "562e0bbc9de1a354c87825ccf732080268d6582a0200f648e8c4a2dcb1e3736d"
+SRC_URI[sha256sum] = "a4d7a05978ee37975c37743510c8991e2debce7ef83afb0a07c0c576fd4f16e8"
BBCLASSEXTEND = "native nativesdk"
Upgrade to release 1.0.3: Fixes: - Complete the setuptools SubCommand protocol - Thread config_settings to the build command - Keep source tree clean in strict editable mode Documentation: - Put uv first in installer tabs and add it to config-settings - List choices for Literal options in the README table - Touch up README options tables, setuptools docs - Show the projects list as a card grid with language/binding badges - Add high-star projects to the known projects list CI and testing: - Make linkcheck retry timeouts from slow hosts - Forward -C config-settings in downstream editable install Include a patch to rename directory name from ${module} __module__ to avoid error due to an unexpanded bitbake variable. This work was sponsored by GOVCERT.LU. Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> --- ...-builder.py-Check-PYTHON_INCLUDE_DIR.patch | 15 ++- ...c-scikit_build_core-Don-t-use-module.patch | 107 ++++++++++++++++++ ....bb => python3-scikit-build-core_1.0.3.bb} | 3 +- 3 files changed, 118 insertions(+), 7 deletions(-) create mode 100644 meta-python/recipes-devtools/python/python3-scikit-build-core/0001-src-scikit_build_core-Don-t-use-module.patch rename meta-python/recipes-devtools/python/{python3-scikit-build-core_0.12.2.bb => python3-scikit-build-core_1.0.3.bb} (76%)