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.
pull/6868/head
Jon Turney 5 years ago committed by Jussi Pakkanen
parent 74028414e4
commit 7005e211a2
  1. 5
      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))

Loading…
Cancel
Save