diff options
| author | Zoltán Böszörményi <zboszor@gmail.com> | 2025-11-12 11:04:53 +0100 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-11-12 06:49:44 -0800 |
| commit | c83aea044ede8a90068c2d271b48789b1e7c4cf4 (patch) | |
| tree | 2cda99bb4f84cde6b1d24b1aea4bd9d034cfb816 /meta-python | |
| parent | c3bc474c6cd7f343ba0b1fbe73e0d7e08b1bb0c7 (diff) | |
| download | meta-openembedded-c83aea044ede8a90068c2d271b48789b1e7c4cf4.tar.gz | |
python3-scikit-build-core: Use cmake from PATH
Added a patch to remove using CMAKE_BIN_DIR. Instead, use
the fallback to find cmake from PATH.
It's a pre-requisite for building python3-nanobind correctly.
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python')
2 files changed, 51 insertions, 1 deletions
diff --git a/meta-python/recipes-devtools/python/python3-scikit-build-core/0001-Find-cmake-from-PATH-instead-of-CMAKE_BIN_DIR.patch b/meta-python/recipes-devtools/python/python3-scikit-build-core/0001-Find-cmake-from-PATH-instead-of-CMAKE_BIN_DIR.patch new file mode 100644 index 0000000000..71319c0245 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-scikit-build-core/0001-Find-cmake-from-PATH-instead-of-CMAKE_BIN_DIR.patch | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | From deb225d2aaeb44f6a4c01eab25624193351f7f58 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= | ||
| 3 | <zboszor@gmail.com> | ||
| 4 | Date: Wed, 12 Nov 2025 09:56:59 +0100 | ||
| 5 | Subject: [PATCH] Find cmake from PATH instead of CMAKE_BIN_DIR | ||
| 6 | MIME-Version: 1.0 | ||
| 7 | Content-Type: text/plain; charset=UTF-8 | ||
| 8 | Content-Transfer-Encoding: 8bit | ||
| 9 | |||
| 10 | python3-cmake is patched to run cmake from PATH. | ||
| 11 | |||
| 12 | Another detail called CMAKE_BIN_DIR is not patched out, but | ||
| 13 | scikit-build-core prefers using it in its program_search.py. | ||
| 14 | It also has a fallback to find cmake from PATH. | ||
| 15 | |||
| 16 | Remove using CMAKE_BIN_DIR and keep the fallback. | ||
| 17 | |||
| 18 | Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com> | ||
| 19 | Upstream-Status: Inappropriate [oe specific] | ||
| 20 | --- | ||
| 21 | src/scikit_build_core/program_search.py | 10 ---------- | ||
| 22 | 1 file changed, 10 deletions(-) | ||
| 23 | |||
| 24 | diff --git a/src/scikit_build_core/program_search.py b/src/scikit_build_core/program_search.py | ||
| 25 | index 7995c14..f82cad3 100644 | ||
| 26 | --- a/src/scikit_build_core/program_search.py | ||
| 27 | +++ b/src/scikit_build_core/program_search.py | ||
| 28 | @@ -90,16 +90,6 @@ class Program(NamedTuple): | ||
| 29 | |||
| 30 | |||
| 31 | def _get_cmake_path(*, module: bool = True) -> Generator[Path, None, None]: | ||
| 32 | - """ | ||
| 33 | - Get the path to CMake. | ||
| 34 | - """ | ||
| 35 | - if module: | ||
| 36 | - with contextlib.suppress(ImportError): | ||
| 37 | - # If a "cmake" directory exists, this will also ImportError | ||
| 38 | - from cmake import CMAKE_BIN_DIR | ||
| 39 | - | ||
| 40 | - yield Path(CMAKE_BIN_DIR) / "cmake" | ||
| 41 | - | ||
| 42 | candidates = ("cmake3", "cmake") | ||
| 43 | for candidate in candidates: | ||
| 44 | cmake_path = shutil.which(candidate) | ||
| 45 | -- | ||
| 46 | 2.51.1 | ||
| 47 | |||
diff --git a/meta-python/recipes-devtools/python/python3-scikit-build-core_0.11.6.bb b/meta-python/recipes-devtools/python/python3-scikit-build-core_0.11.6.bb index 73cbf2a3f9..93a83ead65 100644 --- a/meta-python/recipes-devtools/python/python3-scikit-build-core_0.11.6.bb +++ b/meta-python/recipes-devtools/python/python3-scikit-build-core_0.11.6.bb | |||
| @@ -9,7 +9,10 @@ DEPENDS = "python3-hatch-vcs-native" | |||
| 9 | 9 | ||
| 10 | inherit pypi python_hatchling | 10 | inherit pypi python_hatchling |
| 11 | 11 | ||
| 12 | SRC_URI += "file://0001-builder.py-Check-PYTHON_INCLUDE_DIR.patch" | 12 | SRC_URI += " \ |
| 13 | file://0001-builder.py-Check-PYTHON_INCLUDE_DIR.patch \ | ||
| 14 | file://0001-Find-cmake-from-PATH-instead-of-CMAKE_BIN_DIR.patch \ | ||
| 15 | " | ||
| 13 | SRC_URI[sha256sum] = "5982ccd839735be99cfd3b92a8847c6c196692f476c215da84b79d2ad12f9f1b" | 16 | SRC_URI[sha256sum] = "5982ccd839735be99cfd3b92a8847c6c196692f476c215da84b79d2ad12f9f1b" |
| 14 | 17 | ||
| 15 | BBCLASSEXTEND = "native nativesdk" | 18 | BBCLASSEXTEND = "native nativesdk" |
