diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-01-03 21:18:51 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-01-03 15:10:38 -0500 |
commit | 027af6b064381a1a48f7fe76d3b54162e5d095e7 (patch) | |
tree | 8c7c957101c694941cdb503a318b292db22d648c | |
parent | 079e43f70b639c2c4d9ef345bfa916999f3c0508 (diff) | |
download | meson-027af6b064381a1a48f7fe76d3b54162e5d095e7.zip meson-027af6b064381a1a48f7fe76d3b54162e5d095e7.tar.gz meson-027af6b064381a1a48f7fe76d3b54162e5d095e7.tar.bz2 |
Error out if trying to do gettext without appropriate tools.
-rw-r--r-- | mesonbuild/modules/i18n.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/modules/i18n.py b/mesonbuild/modules/i18n.py index c4e4814..097eedd 100644 --- a/mesonbuild/modules/i18n.py +++ b/mesonbuild/modules/i18n.py @@ -16,6 +16,7 @@ from os import path from .. import coredata, mesonlib, build from ..mesonlib import MesonException import sys +import shutil PRESET_ARGS = { 'glib': [ @@ -63,6 +64,8 @@ class I18nModule: def gettext(self, state, args, kwargs): if len(args) != 1: raise coredata.MesonException('Gettext requires one positional argument (package name).') + if not shutil.which('xgettext'): + raise coredata.MesonException('Can not do gettext because xgettext is not installed.') packagename = args[0] languages = mesonlib.stringlistify(kwargs.get('languages', [])) datadirs = mesonlib.stringlistify(kwargs.get('data_dirs', [])) |