aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/gnome.py
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2020-03-24 23:58:04 +0000
committerJussi Pakkanen <jpakkane@gmail.com>2020-03-29 20:53:50 +0300
commit7005e211a2aaf05626752c0c73d2518d8034911b (patch)
treef4ec544ac3c936bff0fee55f7ab375fcdcfbc8d4 /mesonbuild/modules/gnome.py
parent74028414e4127d7eaf4e8a65c065d97192a4dec8 (diff)
downloadmeson-7005e211a2aaf05626752c0c73d2518d8034911b.zip
meson-7005e211a2aaf05626752c0c73d2518d8034911b.tar.gz
meson-7005e211a2aaf05626752c0c73d2518d8034911b.tar.bz2
Report an errror if glib-compile-resources is missing
Produce a diagnostic if we try to use gnome.compile_resources() when glib-compile-resources isn't present, rather than a python backtrace.
Diffstat (limited to 'mesonbuild/modules/gnome.py')
-rw-r--r--mesonbuild/modules/gnome.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index 76916bb..8317629 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -227,7 +227,10 @@ class GnomeModule(ExtensionModule):
for source_dir in source_dirs:
cmd += ['--sourcedir', os.path.join(state.subdir, source_dir)]
- pc, stdout, stderr = Popen_safe(cmd, cwd=state.environment.get_source_dir())
+ try:
+ pc, stdout, stderr = Popen_safe(cmd, cwd=state.environment.get_source_dir())
+ except (FileNotFoundError, PermissionError):
+ raise MesonException('Could not execute glib-compile-resources.')
if pc.returncode != 0:
m = 'glib-compile-resources failed to get dependencies for {}:\n{}'
mlog.warning(m.format(cmd[1], stderr))