Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2023-08-01 08:54:12 +0300
committerSebastian Dröge <sebastian@centricular.com>2023-09-20 10:00:38 +0300
commit379d3de31c758c7d913838db73cc5335ba9f6748 (patch)
tree209ffe2eddbba17522608ce2801ebcf2622da6e1 /cargo_wrapper.py
parentaa4ba44794243f3e4586af87eccf092bac39bfa6 (diff)
meson: Don't require Python 3.8 for cargo_wrapper.py
Documentation on gstreamer monorepo is disabled because the image we use to build the docs only has Python 3.7 https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2873 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1327>
Diffstat (limited to 'cargo_wrapper.py')
-rw-r--r--cargo_wrapper.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/cargo_wrapper.py b/cargo_wrapper.py
index dadd09842..0b7353c23 100644
--- a/cargo_wrapper.py
+++ b/cargo_wrapper.py
@@ -30,6 +30,12 @@ PARSER.add_argument('--depfile')
PARSER.add_argument('--disable-doc', action="store_true", default=False)
+def shlex_join(args):
+ if hasattr(shlex, 'join'):
+ return shlex.join(args)
+ return ' '.join([shlex.quote(arg) for arg in args])
+
+
def generate_depfile_for(fpath):
file_stem = fpath.parent / fpath.stem
depfile_content = ""
@@ -92,7 +98,7 @@ if __name__ == "__main__":
rustc_target_idx = rust_flags.index('--target')
_ = rust_flags.pop(rustc_target_idx) # drop '--target'
rustc_target = rust_flags.pop(rustc_target_idx)
- env['RUSTFLAGS'] = shlex.join(rust_flags)
+ env['RUSTFLAGS'] = shlex_join(rust_flags)
env['RUSTC'] = rustc_cmdline[0]
features = opts.features