From e6b8b628f071069e0d70869fd958eef1b126e3d4 Mon Sep 17 00:00:00 2001 From: Trevor Woerner Date: Tue, 21 Jan 2025 15:43:28 -0500 Subject: python3-pybind11: switch from pypi to cmake Both python3-pybind11 and python3-pybind11-json exist in upstream meta-oe. However, as part of another task, when python3-bokeh_3.5.1 was updated one of its dependencies (python3-contourpy_1.2.1) required a newer version of python3-pybind11 than what was available in meta-oe scarthgap. A second task now needs python3-pybind11-json as well, which has a dependency on python3-pybind11. With the old: inherit pypi python_setuptools_build_meta python3-pybind11-json was not able to find python3-pybind11 during its configure stage: | CMake Error at CMakeLists.txt:26 (find_package): | By not providing "Findpybind11.cmake" in CMAKE_MODULE_PATH this project has | asked CMake to find a package configuration file provided by "pybind11", | but CMake did not find one. | | Could not find a package configuration file provided by "pybind11" | (requested version 2.2.4) with any of the following names: | | pybind11Config.cmake | pybind11-config.cmake | | Add the installation prefix of "pybind11" to CMAKE_PREFIX_PATH or set | "pybind11_DIR" to a directory containing one of the above files. If | "pybind11" provides a separate development package or SDK, be sure it has | been installed. Switching to: inherit cmake python_setuptools_build_meta fixes this issue and allows the python3-pybind11-json recipe from upsream meta-oe to configure (and build) successfully. Signed-off-by: Trevor Woerner Signed-off-by: Mark Hatle --- .../python/python3-pybind11_2.13.1.bb | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/meta-xilinx-core/recipes-devtools/python/python3-pybind11_2.13.1.bb b/meta-xilinx-core/recipes-devtools/python/python3-pybind11_2.13.1.bb index 3c03069b..32936113 100644 --- a/meta-xilinx-core/recipes-devtools/python/python3-pybind11_2.13.1.bb +++ b/meta-xilinx-core/recipes-devtools/python/python3-pybind11_2.13.1.bb @@ -1,9 +1,27 @@ SUMMARY = "Seamless operability between C++11 and Python" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=774f65abd8a7fe3124be2cdf766cd06f" +DEPENDS = "python3-cmake-native python3-ninja-native" -SRC_URI[sha256sum] = "65be498b1cac516161add1508e65375674916bebf2570d057dc9c3c7bcbbc7b0" +SRCREV = "941f45bcb51457884fa1afd6e24a67377d70f75c" +SRC_URI = "git://github.com/pybind/pybind11.git;branch=stable;protocol=https" -inherit pypi python_setuptools_build_meta +S = "${WORKDIR}/git" + +inherit cmake python_setuptools_build_meta + +EXTRA_OECMAKE = "-DPYBIND11_TEST=OFF" + +do_configure:append() { + cmake_do_configure +} + +do_compile:append() { + cmake_do_compile +} + +do_install:append() { + cmake_do_install +} BBCLASSEXTEND += "native" -- cgit v1.2.3-54-g00ecf