From 1de4a9673b4fc17b1ac4679d05640ca7b093a1f4 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 27 Sep 2022 14:25:51 +0100 Subject: build: Don't check for Python 2 Aside from the fact that Python 2 is an ex-parrot, and has been pining for the fjords for a while now, we depend on Python3 for building this project. Let's use non-deprecated, idiomatic ways to run a Python script. --- tools/grilo-inspect/meson.build | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/tools/grilo-inspect/meson.build b/tools/grilo-inspect/meson.build index 893b9a6..7f512ea 100644 --- a/tools/grilo-inspect/meson.build +++ b/tools/grilo-inspect/meson.build @@ -5,14 +5,9 @@ # # Copyright (C) 2016 Igalia S.L. All rights reserved. -python = find_program('python', required : false) -if not python.found() - python = import('python3').find_python() -endif -if not python.found() - error('Python2 or Python3 is required to compile grilo-inspect') -endif -run_command(python, +python = import('python').find_installation('python3') + +run_command(python.full_path(), '@0@/generate_core_keys.py'.format(meson.current_source_dir()), '@0@/src/grl-metadata-key.h'.format(source_root), '@0@/grl-core-keys.h'.format(meson.current_build_dir()), -- cgit v1.2.1