summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2018-07-24 12:14:09 +0200
committerBastien Nocera <hadess@hadess.net>2018-07-24 12:24:04 +0200
commit82c54af9e6eac38f51c871909df0ba5e10816f6a (patch)
tree70fa777e6b0204c0f32207e23e850946527b41f9 /tools
parentc146f752475b53eddaa5b86090593125789ce93e (diff)
downloadgrilo-82c54af9e6eac38f51c871909df0ba5e10816f6a.tar.gz
grl-inspect: Add Python3 support to grilo-inspect
We need to run a few commands to generate headers before compiling grilo-inspect, make sure to support both Python2 and Python3.
Diffstat (limited to 'tools')
-rw-r--r--tools/grilo-inspect/meson.build8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/grilo-inspect/meson.build b/tools/grilo-inspect/meson.build
index 1131c7a..048c232 100644
--- a/tools/grilo-inspect/meson.build
+++ b/tools/grilo-inspect/meson.build
@@ -5,7 +5,13 @@
#
# Copyright (C) 2016 Igalia S.L. All rights reserved.
-python = find_program('python')
+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,
'@0@/generate_core_keys.py'.format(meson.current_source_dir()),
'@0@/src/grl-metadata-key.h'.format(meson.source_root()),