Revert "setup.py: Use the detected Ninja and quote build_dir"
authorNirbheek Chauhan <nirbheek@centricular.com>
Tue, 3 Jan 2017 17:23:18 +0000 (22:53 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Tue, 3 Jan 2017 17:30:44 +0000 (23:00 +0530)
This reverts commit 9a64b727bf6ad42d66f1e5f0404baca46f57167c.

Closes https://bugzilla.gnome.org/show_bug.cgi?id=776801

The actual fix is in the next commit.

common.py
setup.py

index 67d02d5..8c8b55d 100644 (file)
--- a/common.py
+++ b/common.py
@@ -45,9 +45,10 @@ def git(*args, repository_path='.'):
                                    stderr=subprocess.STDOUT).decode()
 
 def accept_command(commands):
-    """Search @commands and returns the first found command"""
+    """Search @commands and returns the first found absolute path."""
     for command in commands:
-        if shutil.which(command):
+        command = shutil.which(command)
+        if command:
             return command
 
     return None
index 1f9d1a1..38d4f72 100755 (executable)
--- 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"
-                  " $ {} -C {!r}".format(ninja, build_dir))
+                  " $ ninja -C %s" % build_dir)
         except subprocess.CalledProcessError:
             return False