[grilo/ebassi/subproject-variables: 3/6] build: Don't check for Python 2




commit 1de4a9673b4fc17b1ac4679d05640ca7b093a1f4
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue Sep 27 14:25:51 2022 +0100

    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()),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]