[meson] Use find_program for locating python script

Apparently that is the simplest and supported way of finding python scripts.
This commit is contained in:
Ebrahim Byagowi 2020-05-21 20:02:47 +04:30
parent d9177a594b
commit 887aa0214f
3 changed files with 5 additions and 10 deletions

View File

@ -54,8 +54,6 @@ if host_machine.cpu_family() == 'arm' and cpp.alignment('struct { char c; }') !=
endif
endif
python3 = import('python').find_installation('python3')
check_headers = [
['unistd.h'],
['sys/mman.h'],

View File

@ -613,13 +613,13 @@ if have_gobject
enum_c = custom_target('hb-gobject-enums.cc',
input: enums[0],
output: 'hb-gobject-enums.cc',
command: [python3, files('fix_get_types.py')[0], '@INPUT@', '@OUTPUT@']
command: [find_program('fix_get_types.py'), '@INPUT@', '@OUTPUT@']
)
enum_h = custom_target('hb-gobject-enums.h',
input: enums[1],
output: 'hb-gobject-enums.h',
command: [python3, files('fix_get_types.py')[0], '@INPUT@', '@OUTPUT@'],
command: [find_program('fix_get_types.py'), '@INPUT@', '@OUTPUT@'],
install: true,
install_dir: get_option('prefix') / get_option('includedir') / meson.project_name(),
)

View File

@ -272,9 +272,8 @@ disabled_text_rendering_tests = [
foreach file_name : in_house_tests
test_name = file_name.split('.')[0].underscorify()
test(test_name, python3,
test(test_name, find_program('run-tests.py'),
args: [
files('run-tests.py')[0],
hb_shape,
meson.current_source_dir() / 'data' / 'in-house' / 'tests' / file_name,
],
@ -285,9 +284,8 @@ endforeach
foreach file_name : aots_tests
test_name = file_name.split('.')[0].underscorify()
test(test_name, python3,
test(test_name, find_program('run-tests.py'),
args: [
files('run-tests.py')[0],
hb_shape,
meson.current_source_dir() / 'data' / 'aots' / 'tests' / file_name,
],
@ -298,9 +296,8 @@ endforeach
foreach file_name : text_rendering_tests
test_name = file_name.split('.')[0].underscorify()
test(test_name, python3,
test(test_name, find_program('run-tests.py'),
args: [
files('run-tests.py')[0],
hb_shape,
meson.current_source_dir() / 'data' / 'text-rendering-tests' / 'tests' / file_name,
],