From: Nirbheek Chauhan Date: Mon, 2 Jan 2017 20:36:42 +0000 (+0530) Subject: setup.py: Use the detected Ninja and quote build_dir X-Git-Tag: 1.19.3~481^2~388 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9a64b727bf6ad42d66f1e5f0404baca46f57167c;p=platform%2Fupstream%2Fgstreamer.git setup.py: Use the detected Ninja and quote build_dir The build_dir is an absolute path, so quote it. We don't really need to use the absolute path to Ninja in git-update since we pass it to subprocess.call which will do an shutil.which --- diff --git a/common.py b/common.py index 8c8b55d..67d02d5 100644 --- a/common.py +++ b/common.py @@ -45,10 +45,9 @@ def git(*args, repository_path='.'): stderr=subprocess.STDOUT).decode() def accept_command(commands): - """Search @commands and returns the first found absolute path.""" + """Search @commands and returns the first found command""" for command in commands: - command = shutil.which(command) - if command: + if shutil.which(command): return command return None diff --git a/setup.py b/setup.py index 38d4f72..1f9d1a1 100755 --- a/setup.py +++ b/setup.py @@ -54,7 +54,7 @@ class GstBuildConfigurer: subprocess.check_call( [sys.executable, meson, "../"] + self.args + self.get_configs(), cwd=build_dir) print("\nYou can now build GStreamer and its various subprojects running:\n" - " $ ninja -C %s" % build_dir) + " $ {} -C {!r}".format(ninja, build_dir)) except subprocess.CalledProcessError: return False