]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-36235: Fix distutils test_customize_compiler() on macOS (GH-12751)
authorVictor Stinner <vstinner@redhat.com>
Tue, 9 Apr 2019 17:54:10 +0000 (19:54 +0200)
committerGitHub <noreply@github.com>
Tue, 9 Apr 2019 17:54:10 +0000 (19:54 +0200)
Set CUSTOMIZED_OSX_COMPILER to True to disable
_osx_support.customize_compiler().

Lib/distutils/tests/test_sysconfig.py

index 71754ddba17f7cacbacab494bd5be4f510ea4420..9e2aeb833bfd878c73bdb153a8930415ae992218 100644 (file)
@@ -73,6 +73,9 @@ class SysconfigTestCase(support.EnvironGuard,
         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)