[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:
parent
d9177a594b
commit
887aa0214f
|
@ -54,8 +54,6 @@ if host_machine.cpu_family() == 'arm' and cpp.alignment('struct { char c; }') !=
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
python3 = import('python').find_installation('python3')
|
|
||||||
|
|
||||||
check_headers = [
|
check_headers = [
|
||||||
['unistd.h'],
|
['unistd.h'],
|
||||||
['sys/mman.h'],
|
['sys/mman.h'],
|
||||||
|
|
|
@ -613,13 +613,13 @@ if have_gobject
|
||||||
enum_c = custom_target('hb-gobject-enums.cc',
|
enum_c = custom_target('hb-gobject-enums.cc',
|
||||||
input: enums[0],
|
input: enums[0],
|
||||||
output: 'hb-gobject-enums.cc',
|
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',
|
enum_h = custom_target('hb-gobject-enums.h',
|
||||||
input: enums[1],
|
input: enums[1],
|
||||||
output: 'hb-gobject-enums.h',
|
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: true,
|
||||||
install_dir: get_option('prefix') / get_option('includedir') / meson.project_name(),
|
install_dir: get_option('prefix') / get_option('includedir') / meson.project_name(),
|
||||||
)
|
)
|
||||||
|
|
|
@ -272,9 +272,8 @@ disabled_text_rendering_tests = [
|
||||||
foreach file_name : in_house_tests
|
foreach file_name : in_house_tests
|
||||||
test_name = file_name.split('.')[0].underscorify()
|
test_name = file_name.split('.')[0].underscorify()
|
||||||
|
|
||||||
test(test_name, python3,
|
test(test_name, find_program('run-tests.py'),
|
||||||
args: [
|
args: [
|
||||||
files('run-tests.py')[0],
|
|
||||||
hb_shape,
|
hb_shape,
|
||||||
meson.current_source_dir() / 'data' / 'in-house' / 'tests' / file_name,
|
meson.current_source_dir() / 'data' / 'in-house' / 'tests' / file_name,
|
||||||
],
|
],
|
||||||
|
@ -285,9 +284,8 @@ endforeach
|
||||||
foreach file_name : aots_tests
|
foreach file_name : aots_tests
|
||||||
test_name = file_name.split('.')[0].underscorify()
|
test_name = file_name.split('.')[0].underscorify()
|
||||||
|
|
||||||
test(test_name, python3,
|
test(test_name, find_program('run-tests.py'),
|
||||||
args: [
|
args: [
|
||||||
files('run-tests.py')[0],
|
|
||||||
hb_shape,
|
hb_shape,
|
||||||
meson.current_source_dir() / 'data' / 'aots' / 'tests' / file_name,
|
meson.current_source_dir() / 'data' / 'aots' / 'tests' / file_name,
|
||||||
],
|
],
|
||||||
|
@ -298,9 +296,8 @@ endforeach
|
||||||
foreach file_name : text_rendering_tests
|
foreach file_name : text_rendering_tests
|
||||||
test_name = file_name.split('.')[0].underscorify()
|
test_name = file_name.split('.')[0].underscorify()
|
||||||
|
|
||||||
test(test_name, python3,
|
test(test_name, find_program('run-tests.py'),
|
||||||
args: [
|
args: [
|
||||||
files('run-tests.py')[0],
|
|
||||||
hb_shape,
|
hb_shape,
|
||||||
meson.current_source_dir() / 'data' / 'text-rendering-tests' / 'tests' / file_name,
|
meson.current_source_dir() / 'data' / 'text-rendering-tests' / 'tests' / file_name,
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue