]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-34897: avoid distutils test error when CXX is not set (GH-9706)
authorMichael Felt <aixtools@users.noreply.github.com>
Wed, 26 Dec 2018 05:45:19 +0000 (06:45 +0100)
committerNick Coghlan <ncoghlan@gmail.com>
Wed, 26 Dec 2018 05:45:19 +0000 (15:45 +1000)
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.

Lib/test/support/__init__.py
Misc/NEWS.d/next/Library/2018-10-04-20-25-35.bpo-34897.rNE2Cy.rst [new file with mode: 0644]

index 53119e138cff4772884f64bc313fc8090c762421..dd1790d592b1aeacb61e3aad0c6955edebe249f2 100644 (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]
diff --git a/Misc/NEWS.d/next/Library/2018-10-04-20-25-35.bpo-34897.rNE2Cy.rst b/Misc/NEWS.d/next/Library/2018-10-04-20-25-35.bpo-34897.rNE2Cy.rst
new file mode 100644 (file)
index 0000000..f253496
--- /dev/null
@@ -0,0 +1,2 @@
+Adjust test.support.missing_compiler_executable check so that a nominal
+command name of "" is ignored. Patch by Michael Felt.