don't probe meson with "python meson runpython --version"

runpython is internal flag that's not supported in all versions, and was
used to prevent testing "python --version" in case MESON was empty, but
that's now checked for explicitly, so that can be removed.

Also fix logic error when selecting pyuno python version / the one that
has the final say on what python will be used for the build. Skipping
the version bump to 3.7 or later when PYTHON_FOR_BUILD was already set
just nullifies the earlier check wrt harfbuzz/whether meson is needed.

Change-Id: I50bb74a806f8c48d91e12616b69e64c2caa4e7be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185754
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
This commit is contained in:
Christian Lohmaier
2025-05-26 13:09:43 +02:00
parent 0bf0a1e36d
commit af51efd5c2
+2 -2
View File
@@ -10422,7 +10422,7 @@ if test $enable_python = system; then
# This causes an error if no python command is found
# the version found here also sets PYTHON_FOR_BUILD below, so the python picked here
# needs to be suitable for meson/the harfbuzz build
if test -z "$PYTHON_FOR_BUILD" -a "$with_system_harfbuzz" = "yes"; then
if test "$with_system_harfbuzz" = "yes" -o -n "$NEED_MESON" ; then
AM_PATH_PYTHON([3.7])
else
AM_PATH_PYTHON([3.3])
@@ -11508,7 +11508,7 @@ else
PathFormat "$MESON"
MESON="$formatted_path"
AC_MSG_CHECKING([whether meson can be run with "$PYTHON_FOR_BUILD $MESON"])
if ($PYTHON_FOR_BUILD $MESON runpython --version >/dev/null) ; then
if ($PYTHON_FOR_BUILD $MESON --version >/dev/null) ; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])