From 22cc6b665e816828a9458271abe352c0df4936ac Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 17 Mar 2015 18:02:33 -0700 Subject: [PATCH] Only test executability when platformBinary is true. Others will likely be run by Python or similar. --- build.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/build.py b/build.py index d6e44a05..a499dbd0 100755 --- a/build.py +++ b/build.py @@ -488,13 +488,14 @@ def getTool(cmdName, version, MD5, envVar, platformBinary): print(' expected "%s"' % md5) print(' Set %s in the environment to use a local build of %s instead' % (envVar, cmdName)) sys.exit(1) - try: - p = subprocess.Popen([cmd, '--help'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=os.environ) - p.wait() - except OSError, e: - print('ERROR: Could not execute %s, got "%s"' % (cmd, e)) - print(' Set %s in the environment to use a local build of %s instead' % (envVar, cmdName)) - sys.exit(1) + if platformBinary: + try: + p = subprocess.Popen([cmd, '--help'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=os.environ) + p.wait() + except OSError, e: + print('ERROR: Could not execute %s, got "%s"' % (cmd, e)) + print(' Set %s in the environment to use a local build of %s instead' % (envVar, cmdName)) + sys.exit(1) return cmd msg('Not found. Attempting to download...')