From 98ea16daf99bb38df1561b2e3fb39a0126cc3ca4 Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Thu, 1 Nov 2018 16:49:25 -0700 Subject: SConstruct: improve the error message when Python detection fails. --- SConstruct | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'SConstruct') 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 -- cgit v1.2.1