[Python-checkins] bpo-36235: Fix distutils test_customize_compiler() on macOS (GH-12751)

Victor Stinner webhook-mailer at python.org
Tue Apr 9 13:54:29 EDT 2019


https://github.com/python/cpython/commit/22de4ce498b656063e236350e8404981c13e1cd8
commit: 22de4ce498b656063e236350e8404981c13e1cd8
branch: 2.7
author: Victor Stinner <vstinner at redhat.com>
committer: GitHub <noreply at github.com>
date: 2019-04-09T19:54:10+02:00
summary:

bpo-36235: Fix distutils test_customize_compiler() on macOS (GH-12751)

Set CUSTOMIZED_OSX_COMPILER to True to disable
_osx_support.customize_compiler().

files:
M Lib/distutils/tests/test_sysconfig.py

diff --git a/Lib/distutils/tests/test_sysconfig.py b/Lib/distutils/tests/test_sysconfig.py
index 71754ddba17f..9e2aeb833bfd 100644
--- a/Lib/distutils/tests/test_sysconfig.py
+++ b/Lib/distutils/tests/test_sysconfig.py
@@ -73,6 +73,9 @@ def set_executables(self, **kw):
         comp = compiler()
         old_vars = dict(sysconfig._config_vars)
         try:
+            # On macOS, disable _osx_support.customize_compiler()
+            sysconfig._config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
+
             for key, value in sysconfig_vars.items():
                 sysconfig._config_vars[key] = value
             sysconfig.customize_compiler(comp)



More information about the Python-checkins mailing list