Hi *, On Wed, Apr 16, 2025 at 9:21 AM Stephan Bergmann <stephan.bergm...@allotropia.de> wrote: > > On 16.04.25 08:40, Stephan Bergmann wrote: > > On 16.04.25 08:15, Miklos Vajna wrote: > >> There has been advice on IRC that the "python3" prefix here is not > >> wanted: > >> […] > >> It seems you hit a similar case because the internal python is > >> Python-3.11.12, so in case your meson is not installed using that > >> python, the python module of meson (mesonbuild) won't be found. >>[…] > > I would naively assume that it would be exceptional scenarios rather > > than the norm that invocations of $(MESON) need to be prefixed by $(call > > gb_ExternalExecutable_get_command,python) in external/harfbuzz/ > > ExternalProject_harfbuzz.mk. Yet <https://gerrit.libreoffice.org/c/ > > core/+/183345> "harfbuzz: migrate to meson" is unfortunately silent on > > why it adds that prefix, and why it adds that prefix unconditionally. > > Cloph, can you please clarify?
That is common prefix to run python tools, it is system python/the one picked up by configure.ac with no special stuff (the PYTHON_FOR_BUILD value, i.e. just python3 usually) and in the case of --enable-python=fully-internal it points to internal python and does also set up pythonpaths in addition. It needs to be used for all python commands used by the build, since otherwise --enable-python=fully-internal wouldn't work. > maybe <https://gerrit.libreoffice.org/c/core/+/184254> "Only run meson > from python when it apparently needs to be" is a way out here? that is a workaround for distros using multiple versions of meson and the default python3 cannot run it. Real solution is to either tell our configure to use that newer python that meson uses for everything (PYTHON=python3.11 for example in autogen.input) or use a standalone/plain release tarball of meson that doesn't require on any distro-specific packaging magic/can be run with multiple different python runtimes (MESON=/path/to/meson.py in autogen.input) https://gerrit.libreoffice.org/c/core/+/184271 adds some checks to configure.ac and also fixes a build issue when using --enable-python=fully-internal on linux (and one that very likely can also fail in the case where python3 is way older than the version of python used for the system meson) ciao Christian