pytango: document build process

This commit is contained in:
Grzegorz Kowalski 2024-03-15 18:19:13 +01:00
parent d78e497d7e
commit 068d299fad

View File

@ -8,6 +8,13 @@ RDEPENDS:${PN} = "python3 python3-numpy python3-packaging"
# for toolchain.cmake file
inherit cmake
inherit python3targetconfig pkgconfig pypi python_pep517
# The classes inheritance and build process here is a bit tricky.
# PyTango uses python build (PEP517) which runs the build using
# scikit-build-core which in turn uses CMake to build the extension.
# So first we inherit cmake to generate cmake configuration (toolchain.cmake)
# and then we also inherit python_pep517 to overwrite
# do_configure/do_compile/do_install with the correct ones.
# This almost works, but you have to play a bit with CMAKE_ARGS.
# TODO: Why is python include dir not found automatically?
export CMAKE_ARGS = "-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake -DPython_INCLUDE_DIR=${STAGING_DIR_TARGET}${includedir}/${PYTHON_DIR}"