Skip to content

Commit d318524

Browse files
apprehensionskjellahl
authored andcommitted
meson: simplify lookup of python command
1 parent ef672fc commit d318524

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

meson.build

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,7 @@ project_build_root = meson.current_build_dir()
4141

4242
cpp_compiler = meson.get_compiler('cpp')
4343
is_msvc = cpp_compiler.get_id() == 'msvc'
44-
python3 = import('python').find_installation()
45-
46-
python_version = python3.language_version()
47-
python_version_req = '>= 3.5'
48-
if not python_version.version_compare(python_version_req)
49-
error('Requires Python @0@, found @1@.'.format(python_version_req, python_version))
50-
endif
44+
python3 = find_program('python3', version: '>=3.5')
5145

5246
# Do we build from a git repository?
5347
# Suppose we do if and only if the meson.build file is tracked by git.

0 commit comments

Comments
 (0)