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




commit 04353b67384494c04ed74c4efed2e9fa112f037c
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]