From d6a9b4041c04c47cc289c76aed44c4edcb8d4ffa Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Sun, 28 Jan 2024 23:18:10 +0100 Subject: [PATCH] Make subprocess inherit environment variables The PATH environment variable got unset for that subprocess, thus not being able to find msgfmt. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 11057c53822..2184d86db99 100755 --- a/setup.py +++ b/setup.py @@ -208,7 +208,7 @@ def merge(in_file, out_file, option, po_dir="po"): """ if not os.path.exists(out_file) and os.path.exists(in_file): cmd = ["msgfmt", option, "--template", in_file, "-d", po_dir, "-o", out_file] - if subprocess.call(cmd, env={"GETTEXTDATADIR": po_dir}) != 0: + if subprocess.call(cmd, env={**os.environ, "GETTEXTDATADIR": po_dir}) != 0: msg = "ERROR: %s was not merged into the translation files!\n" % out_file raise SystemExit(msg) _LOG.info("Compiling %s >> %s", in_file, out_file)