GLib2 tries to find "python3" and if it can't find it, it will go for "python"; if port select wasn't explicitly run, this will likely end-up with Python 2.7. As a fallback, meson can use whatever python it's running on if the argument to find_installation is empty. --- meson.build.orig 2026-02-10 12:21:31 +++ meson.build 2026-02-10 12:25:27 @@ -2506,13 +2506,13 @@ glib_conf.set('HAVE_PROC_SELF_CMDLINE', have_proc_self_cmdline) -python = import('python').find_installation() +python = import('python').find_installation('') # Sets the shebang on script files. This has been changed many times including # using env, the absolute path to the Python executable, and using both python # and python3 names. Please review the history here, prior to suggesting # further changes: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4391 -python_shebang = '/usr/bin/env python3' +python_shebang = '@PYTHON@' python_version = python.language_version() python_version_req = '>=3.7'