scons: Fix python-config parsing by adding strip()
authorAndreas Hansson <andreas.hansson@arm.com>
Sun, 13 Apr 2014 14:07:55 +0000 (10:07 -0400)
committerAndreas Hansson <andreas.hansson@arm.com>
Sun, 13 Apr 2014 14:07:55 +0000 (10:07 -0400)
This patch fixes an issue with the way the python-config path is
parsed, as it caused issues on systems where a newline ended up being
included in the path.

SConstruct

index ff36fbccdc26662a47072b8bb3c0d5c2f8970eeb..a1aad32d4f548c0b293cfca3ad4d8b3a309f2d56 100755 (executable)
@@ -876,7 +876,8 @@ if main['M5_BUILD_CACHE']:
 # First we check if python2-config exists, else we use python-config
 python_config = readCommand(['which', 'python2-config'], exception='').strip()
 if not os.path.exists(python_config):
-    python_config = readCommand(['which', 'python-config'], exception='')
+    python_config = readCommand(['which', 'python-config'],
+                                exception='').strip()
 py_includes = readCommand([python_config, '--includes'],
                           exception='').split()
 # Strip the -I from the include folders before adding them to the