summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools
diff options
context:
space:
mode:
authorTafil Avdyli <tafil@tafhub.de>2026-02-19 19:29:18 +0100
committerAnuj Mittal <anuj.mittal@oss.qualcomm.com>2026-02-25 13:00:45 +0530
commitc88db38ad668e7333d20f82697c4ffc64ec862d9 (patch)
treeeaf03b345b43b2a830e7092f8556f702829334d2 /meta-python/recipes-devtools
parent560eef1dc269ff631600dcf7aa6bad38497dc372 (diff)
downloadmeta-openembedded-c88db38ad668e7333d20f82697c4ffc64ec862d9.tar.gz
python3-pybind11-json: fix Targets.cmake trying to reference host
The resulting pybind11_jsonTargets.cmake in the dev-package adds an absolute path to python include directories in the target properties: set_target_properties(pybind11_json PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "/usr/include/python3.13;${_IMPORT_PREFIX}/include" ) The patch removes ${PYTHON_INCLUDE_DIRS} which is set by pybind11 from set_target_properties to remove the poisonous host path. Signed-off-by: Tafil Avdyli <tafil@tafhub.de> Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 0332dae9bb2ff79e4a4faa45c42d96e0dccee4db) Signed-off-by: Tafil Avdyli <tafil@tafhub.de> Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
Diffstat (limited to 'meta-python/recipes-devtools')
-rw-r--r--meta-python/recipes-devtools/python/python3-pybind11-json/0001-CMakeLists-drop-PYTHON_INCLUDE_DIRS-from-interface.patch34
-rw-r--r--meta-python/recipes-devtools/python/python3-pybind11-json_0.2.13.bb3
2 files changed, 36 insertions, 1 deletions
diff --git a/meta-python/recipes-devtools/python/python3-pybind11-json/0001-CMakeLists-drop-PYTHON_INCLUDE_DIRS-from-interface.patch b/meta-python/recipes-devtools/python/python3-pybind11-json/0001-CMakeLists-drop-PYTHON_INCLUDE_DIRS-from-interface.patch
new file mode 100644
index 0000000000..e1bf82e506
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pybind11-json/0001-CMakeLists-drop-PYTHON_INCLUDE_DIRS-from-interface.patch
@@ -0,0 +1,34 @@
1From 6d4af27d1b43860d8deb3d1d2b2a910e82618ac1 Mon Sep 17 00:00:00 2001
2From: Tafil Avdyli <tafil@tafhub.de>
3Date: Sat, 24 Jan 2026 09:14:03 +0100
4Subject: [PATCH] CMakeLists: drop PYTHON_INCLUDE_DIRS from interface
5
6Including PYTHON_INCLUDE_DIRS in the INTERFACE list caused a hard-coded
7Python include directory (e.g. /usr/include/python3.13) to appear in the
8generated Targets.cmake file. This resulted in a CMake configuration
9error when the path did not exist:
10
11 Imported target "pybind11_json" includes non-existent path
12 "/usr/include/python3.13"
13
14pybind11_json is header-only and does not use Python headers, so the
15include path should not be exported.
16
17Upstream-Status: Submitted [https://github.com/pybind/pybind11_json/pull/77]
18Signed-off-by: Tafil Avdyli <tafil@tafhub.de>
19---
20 CMakeLists.txt | 1 -
21 1 file changed, 1 deletion(-)
22
23diff --git a/CMakeLists.txt b/CMakeLists.txt
24index 0be4838..4b305e4 100644
25--- a/CMakeLists.txt
26+++ b/CMakeLists.txt
27@@ -45,7 +45,6 @@ add_library(${PROJECT_NAME} INTERFACE)
28
29 target_include_directories(${PROJECT_NAME}
30 INTERFACE
31- ${PYTHON_INCLUDE_DIRS}
32 $<BUILD_INTERFACE:${PYBIND11_JSON_INCLUDE_DIR}>
33 $<INSTALL_INTERFACE:include>)
34
diff --git a/meta-python/recipes-devtools/python/python3-pybind11-json_0.2.13.bb b/meta-python/recipes-devtools/python/python3-pybind11-json_0.2.13.bb
index 67bd2a33a7..e348168b8d 100644
--- a/meta-python/recipes-devtools/python/python3-pybind11-json_0.2.13.bb
+++ b/meta-python/recipes-devtools/python/python3-pybind11-json_0.2.13.bb
@@ -3,7 +3,8 @@ LICENSE = "BSD-3-Clause"
3LIC_FILES_CHKSUM = "file://LICENSE;md5=0e25ff0ec476d06d366439e1120cce98" 3LIC_FILES_CHKSUM = "file://LICENSE;md5=0e25ff0ec476d06d366439e1120cce98"
4 4
5SRCREV = "b02a2ad597d224c3faee1f05a56d81d4c4453092" 5SRCREV = "b02a2ad597d224c3faee1f05a56d81d4c4453092"
6SRC_URI = "git://github.com/pybind/pybind11_json;branch=master;protocol=https" 6SRC_URI = "git://github.com/pybind/pybind11_json;branch=master;protocol=https \
7 file://0001-CMakeLists-drop-PYTHON_INCLUDE_DIRS-from-interface.patch"
7 8
8DEPENDS += "nlohmann-json python3-pybind11" 9DEPENDS += "nlohmann-json python3-pybind11"
9 10