From 1a3573a108f61641d6bb719cd5a07c487d70ee44 Mon Sep 17 00:00:00 2001 From: Roumen Petrov Date: Tue, 12 Feb 2013 01:35:32 +0200 Subject: [PATCH] MINGW-issue12641: avoid syntax warning --- Lib/distutils/sysconfig.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py index e3ceb53..dd3d184 100644 --- a/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py @@ -168,13 +168,13 @@ def customize_compiler(compiler): Mainly needed on Unix, so we can plug in the information that varies across Unices and is stored in Python's Makefile. """ + global _config_vars if compiler.compiler_type in ["cygwin", "mingw32"]: # Note that cygwin use posix build and 'unix' compiler. # If build is not based on posix then we must predefine # some environment variables corresponding to posix # build rules and defaults. if not 'GCC' in sys.version: - global _config_vars _config_vars['CC'] = "gcc" _config_vars['CXX'] = "g++" _config_vars['OPT'] = "-fwrapv -O3 -Wall -Wstrict-prototypes" @@ -194,7 +194,6 @@ def customize_compiler(compiler): # that Python itself was built on. Also the user OS # version and build tools may not support the same set # of CPU architectures for universal builds. - global _config_vars if not _config_vars.get('CUSTOMIZED_OSX_COMPILER', ''): import _osx_support _osx_support.customize_compiler(_config_vars) -- 1.7.12.1