From ac09782a17603c828e202edf04b60548e2ab0371 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 17 Aug 2025 23:57:21 +0300 Subject: [PATCH] Documentation: Use python3 directly to check for doxylink version When checking the version of the sphinxcontrib.doxylink module, the Python interpreter used by Sphinx must be used, as that's where the module will be imported from. Using the meson python_installation object for this purpose is incorrect, as it's meant to access the Python installation of the host machine, not the system Python interpreter on the build machine. For instance, when cross-compiling libcamera against a Buildroot environment, and pointing meson in the cross-file to the build machine Python interpreter from Buildroot, the meson python module will refer to the latter, while Sphinx will use the former. Fix this by using python3 directly. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen --- Documentation/meson.build | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Documentation/meson.build b/Documentation/meson.build index 10aaf613..a8d4afc0 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -124,12 +124,9 @@ if sphinx.found() # Many distributions do not provide a recent-enough version of the doxylink # module. This results in a build error with a cryptic message. Check the # version manually and print clear error messages. - py_mod = import('python') - py3 = py_mod.find_installation('python3') - mod = 'sphinxcontrib.doxylink' min_version = '>=1.6.1' - version = run_command(py3, '-c', + version = run_command('python3', '-c', 'import @0@ ; print(@0@.__version__)'.format(mod), check : false).stdout().strip()