plug-ins: Fix .py plugins on non-relocatable macOS builds

We can't rely on python3 from shebang or python3 from .interp since
the found python by Meson can be python3.XX on MacPorts and Homebrew,
even with the PATH environment variable properly set.

Also, explains better the purpose of python 3 on relocatable builds.
This commit is contained in:
Bruno Lopes 2026-01-15 18:39:32 -03:00
parent 8a42c03f0b
commit 62cf8034a2

View file

@ -49,9 +49,15 @@ if (platform_windows or platform_osx) and not meson.is_cross_build() and python.
install_data('pygimp_win.interp',
install_dir: gimpplugindir / 'interpreters',
)
else
# A 'python3' symlink is created on macOS.
python_config.set('PYTHON_EXE', 'python3')
elif platform_osx
# python* is needed to run plug-ins with right build-time interpreter when non-relocatable
if not relocatable_bundle
python_config.set('PYTHON_EXE', python.path())
# python3 is needed to run plug-ins with right bundled interpreter when relocatable
else
python_config.set('PYTHON_EXE', 'python3')
endif
endif
configure_file(input : 'pygimp.interp.in',