From 9a785dc3890ceec75a36cbe8837b553a414b16c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20B=C3=A1lint=20Misius?= Date: Mon, 29 Apr 2024 17:50:45 +0200 Subject: [PATCH] Fix assumption that python is called python The assumption was introduced by 7e674a887d69, where find_program('python') was used instead of Meson's built-in python discovery services. This turned out to be a bad idea because of course there are systems in 2024 where python is not python 3. --- meson.build | 5 ++++- resources/meson.build | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 29ecebcec..6e924f36c 100644 --- a/meson.build +++ b/meson.build @@ -15,9 +15,12 @@ if get_option('prepare') subdir_done() endif +python = import('python') +python3_prog = python.find_installation('python3') + fs = import('fs') to_array = generator( - find_program('python'), + python3_prog, output: [ '@PLAINNAME@.cpp', '@PLAINNAME@.h' ], arguments: [ join_paths(meson.current_source_dir(), 'resources/to-array.py'), '@OUTPUT0@', '@OUTPUT1@', '@INPUT@', '@EXTRA_ARGS@' ] ) diff --git a/resources/meson.build b/resources/meson.build index e2dd8e2be..95248123a 100644 --- a/resources/meson.build +++ b/resources/meson.build @@ -49,7 +49,7 @@ if host_platform == 'windows' } foreach key, icons : win_icos command = [ - find_program('python'), + python3_prog, join_paths(meson.current_source_dir(), 'make-ico.py'), '@OUTPUT@', ]