summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-11-01 16:49:25 -0700
committerGary E. Miller <gem@rellim.com>2018-11-01 16:49:25 -0700
commit98ea16daf99bb38df1561b2e3fb39a0126cc3ca4 (patch)
tree047136ee93ff403dec02357e832d8c288bffe2bf /SConstruct
parent02d21faebec245e1526449fb54e7078914d75db7 (diff)
downloadgpsd-98ea16daf99bb38df1561b2e3fb39a0126cc3ca4.tar.gz
SConstruct: improve the error message when Python detection fails.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct7
1 files changed, 4 insertions, 3 deletions
diff --git a/SConstruct b/SConstruct
index 0226cd20..421897b5 100644
--- a/SConstruct
+++ b/SConstruct
@@ -626,8 +626,7 @@ def GetPythonValue(context, name, imp, expr, brief=False):
if not env['target_python']:
status, value = 0, str(eval(expr))
else:
- command = [target_python_path, '-c',
- '%s; print(%s)' % (imp, expr)]
+ command = [target_python_path, '-c', '%s; print(%s)' % (imp, expr)]
try:
status, value = _getstatusoutput(command, shell=False)
except OSError:
@@ -636,7 +635,9 @@ def GetPythonValue(context, name, imp, expr, brief=False):
value = value.strip()
else:
value = ''
- announce("Python command failed - disabling Python.")
+ announce('Python command "%s" failed - disabling Python.\n'
+ 'Python components will NOT be installed' %
+ command[2])
env['python'] = False
context.Result('failed' if status else 'ok' if brief else value)
return value