bpo-34897: avoid distutils test error when CXX is not set (GH-9706)

Depending on system config, a missing candidate compiler name may be
reported as the empty string rather than as None, so adjust the test
helper accordingly.
This commit is contained in:
Michael Felt 2018-12-26 06:45:19 +01:00 committed by Nick Coghlan
parent 2062a20641
commit 259c159fc1
2 changed files with 3 additions and 1 deletions

View File

@ -2783,7 +2783,7 @@ def missing_compiler_executable(cmd_names=[]):
if cmd_names:
assert cmd is not None, \
"the '%s' executable is not configured" % name
elif cmd is None:
elif not cmd:
continue
if spawn.find_executable(cmd[0]) is None:
return cmd[0]

View File

@ -0,0 +1,2 @@
Adjust test.support.missing_compiler_executable check so that a nominal
command name of "" is ignored. Patch by Michael Felt.