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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user