Fix assumption that python is called python

The assumption was introduced by 7e674a887d, 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.
This commit is contained in:
Tamás Bálint Misius
2024-04-29 17:50:45 +02:00
parent 81d684b04c
commit 9a785dc389
2 changed files with 5 additions and 2 deletions

View File

@@ -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@' ]
)

View File

@@ -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@',
]