aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/scripts/msgfmthelper.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-03-05 20:07:10 -0500
committerEli Schwartz <eschwartz@archlinux.org>2022-03-06 10:48:34 -0500
commit768616b0f8c0a0349e84517b51b1b8e51c79d6b6 (patch)
treeaee0e9eb61a93e21f9fd6976ab615583d3848255 /mesonbuild/scripts/msgfmthelper.py
parente67fd1f55135c2a80257efcb9a19607024568f8d (diff)
downloadmeson-768616b0f8c0a0349e84517b51b1b8e51c79d6b6.zip
meson-768616b0f8c0a0349e84517b51b1b8e51c79d6b6.tar.gz
meson-768616b0f8c0a0349e84517b51b1b8e51c79d6b6.tar.bz2
scripts: accept the path of the gettext commands to run as an argument
Don't assume itstool, msgfmt et al. are just magically on the path. Normally for commands being processed in build.ninja we'd look up the program in order to run it. Offer the same guarantee for programs being passed through an awkward script wrapper.
Diffstat (limited to 'mesonbuild/scripts/msgfmthelper.py')
-rw-r--r--mesonbuild/scripts/msgfmthelper.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/scripts/msgfmthelper.py b/mesonbuild/scripts/msgfmthelper.py
index 3ddc9e6..b308f54 100644
--- a/mesonbuild/scripts/msgfmthelper.py
+++ b/mesonbuild/scripts/msgfmthelper.py
@@ -22,6 +22,7 @@ parser.add_argument('input')
parser.add_argument('output')
parser.add_argument('type')
parser.add_argument('podir')
+parser.add_argument('--msgfmt', default='msgfmt')
parser.add_argument('--datadirs', default='')
parser.add_argument('args', default=[], metavar='extra msgfmt argument', nargs='*')
@@ -32,6 +33,6 @@ def run(args: T.List[str]) -> int:
if options.datadirs:
env = os.environ.copy()
env.update({'GETTEXTDATADIRS': options.datadirs})
- return subprocess.call(['msgfmt', '--' + options.type, '-d', options.podir,
+ return subprocess.call([options.msgfmt, '--' + options.type, '-d', options.podir,
'--template', options.input, '-o', options.output] + options.args,
env=env)