From 62cf8034a24812fc6f29fb07ae3a3cc08580cc2b Mon Sep 17 00:00:00 2001 From: Bruno Lopes Date: Thu, 15 Jan 2026 18:39:32 -0300 Subject: [PATCH] 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. --- plug-ins/python/meson.build | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/plug-ins/python/meson.build b/plug-ins/python/meson.build index 7643d89e4b..aba267ae23 100644 --- a/plug-ins/python/meson.build +++ b/plug-ins/python/meson.build @@ -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',