build(meson): use python module instead of find_prog

This makes Meson use the internal Python version instead of looking for
the "python3" executable in the system.

This means that python will be more likely to be found on system where
the binary is named differently (Windows?), python3 is not required (any
version will do), and could even be faster.
parent 6c4f2d8e
...@@ -88,7 +88,7 @@ if meson.version().version_compare('>=0.57.0') ...@@ -88,7 +88,7 @@ if meson.version().version_compare('>=0.57.0')
else else
# Ugly workaround for reading a file # Ugly workaround for reading a file
version_data_raw = run_command( version_data_raw = run_command(
find_program('python3'), '-c', 'print(open("version.txt").read())' import('python').find_installation(), '-c', 'print(open("version.txt").read())'
).stdout().strip().split('\n') ).stdout().strip().split('\n')
endif endif
version_data_conf = configuration_data() version_data_conf = configuration_data()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment