Ensure we get the interpreter from python-any-r1 rather than same as meson. Plus find_program() is quicker than find_installation(), and the latter also needs distutils that is unavailable with python3_12 without setuptools. https://bugs.gentoo.org/731728 Update: former should no longer be an issue since [1], but keeping patch given [2] is still an issue [1] https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0686381dfc3d [2] https://github.com/mesonbuild/meson/issues/7702 --- a/meson.build +++ b/meson.build @@ -323,3 +323,3 @@ thirdparty = meson.project_source_root()/'3rdparty' -python = import('python').find_installation() +python = find_program('python3') python_env = environment()