Add a patch to use PYTHON_INCLUDE_DIR to find Python Interpreter and Development.Module as suggested by Stephan Kulow: https://github.com/scikit-build/scikit-build-core/issues/952#issuecomment-2554058930
This work was sponsored by GOVCERT.LU. Suggested-by: Stephan Kulow <[email protected]> Signed-off-by: Leon Anavi <[email protected]> --- ...-builder.py-Check-PYTHON_INCLUDE_DIR.patch | 32 +++++++++++++++++++ .../python3-scikit-build-core_0.10.7.bb | 1 + 2 files changed, 33 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-scikit-build-core/0001-builder.py-Check-PYTHON_INCLUDE_DIR.patch diff --git a/meta-python/recipes-devtools/python/python3-scikit-build-core/0001-builder.py-Check-PYTHON_INCLUDE_DIR.patch b/meta-python/recipes-devtools/python/python3-scikit-build-core/0001-builder.py-Check-PYTHON_INCLUDE_DIR.patch new file mode 100644 index 0000000000..13cb7b1e7f --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-scikit-build-core/0001-builder.py-Check-PYTHON_INCLUDE_DIR.patch @@ -0,0 +1,32 @@ +From 5bc2d175c6a31a3de04444e5e22af310799ab10d Mon Sep 17 00:00:00 2001 +From: Leon Anavi <[email protected]> +Date: Mon, 27 Jan 2025 19:17:48 +0200 +Subject: [PATCH] builder.py: Check PYTHON_INCLUDE_DIR + +Use PYTHON_INCLUDE_DIR to find Python Interpreter and +Development.Module. + +Upstream-Status: Inappropriate [oe specific] + +Suggested-by: Stephan Kulow <[email protected]> +Signed-off-by: Leon Anavi <[email protected]> +--- + src/scikit_build_core/builder/builder.py | 2 +- + 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 b19173f..f4fb2af 100644 +--- a/src/scikit_build_core/builder/builder.py ++++ b/src/scikit_build_core/builder/builder.py +@@ -203,7 +203,7 @@ class Builder: + python_sabi_library = ( + get_python_library(self.config.env, abi3=True) if limited_api else None + ) +- 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() + + # Classic Find Python +-- +2.39.5 + diff --git a/meta-python/recipes-devtools/python/python3-scikit-build-core_0.10.7.bb b/meta-python/recipes-devtools/python/python3-scikit-build-core_0.10.7.bb index 7c6c9ddda3..4df47c3c5d 100644 --- a/meta-python/recipes-devtools/python/python3-scikit-build-core_0.10.7.bb +++ b/meta-python/recipes-devtools/python/python3-scikit-build-core_0.10.7.bb @@ -9,6 +9,7 @@ DEPENDS = "python3-hatch-vcs-native" inherit pypi python_hatchling +SRC_URI += "file://0001-builder.py-Check-PYTHON_INCLUDE_DIR.patch" SRC_URI[sha256sum] = "04cbb59fe795202a7eeede1849112ee9dcbf3469feebd9b8b36aa541336ac4f8" BBCLASSEXTEND = "native nativesdk" -- 2.39.5
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#115131): https://lists.openembedded.org/g/openembedded-devel/message/115131 Mute This Topic: https://lists.openembedded.org/mt/110876403/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
