diff options
author | Bastien Nocera <hadess@hadess.net> | 2018-07-24 12:14:09 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2018-07-24 12:24:04 +0200 |
commit | 82c54af9e6eac38f51c871909df0ba5e10816f6a (patch) | |
tree | 70fa777e6b0204c0f32207e23e850946527b41f9 | |
parent | c146f752475b53eddaa5b86090593125789ce93e (diff) | |
download | grilo-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.
-rw-r--r-- | tools/grilo-inspect/meson.build | 8 |
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()), |