diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
commit | fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch) | |
tree | 4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /build/RunCbindgen.py | |
parent | Releasing progress-linux version 124.0.1-1~progress7.99u1. (diff) | |
download | firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'build/RunCbindgen.py')
-rw-r--r-- | build/RunCbindgen.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/build/RunCbindgen.py b/build/RunCbindgen.py index e166556f68..fbbe9d0584 100644 --- a/build/RunCbindgen.py +++ b/build/RunCbindgen.py @@ -7,7 +7,6 @@ import subprocess import buildconfig import mozpack.path as mozpath -import six import toml @@ -29,11 +28,11 @@ def _run_process(args): env["CARGO"] = str(buildconfig.substs["CARGO"]) env["RUSTC"] = str(buildconfig.substs["RUSTC"]) - p = subprocess.Popen(args, env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + p = subprocess.Popen( + args, env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding="utf-8" + ) stdout, stderr = p.communicate() - stdout = six.ensure_text(stdout) - stderr = six.ensure_text(stderr) if p.returncode != 0: print(stdout) print(stderr) @@ -63,7 +62,8 @@ def generate_metadata(output, cargo_config): if returncode != 0: return returncode - output.write(stdout) + if stdout: + output.write(stdout) # This is not quite accurate, but cbindgen only cares about a subset of the # data which, when changed, causes these files to change. @@ -88,7 +88,8 @@ def generate(output, metadata_path, cbindgen_crate_path, *in_tree_dependencies): if returncode != 0: return returncode - output.write(stdout) + if stdout: + output.write(stdout) deps = set() deps.add(CARGO_LOCK) |