mirror of
https://github.com/python/cpython.git
synced 2025-07-23 19:25:40 +00:00
Issue #21923: Prevent AttributeError in distutils.sysconfig.customize_compiler
due to possible uninitialized _config_vars. Original patch by Alex Gaynor.
This commit is contained in:
parent
898eb82696
commit
7bc5fb6916
3 changed files with 27 additions and 1 deletions
|
@ -179,7 +179,8 @@ def customize_compiler(compiler):
|
|||
# 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', ''):
|
||||
# Use get_config_var() to ensure _config_vars is initialized.
|
||||
if not get_config_var('CUSTOMIZED_OSX_COMPILER'):
|
||||
import _osx_support
|
||||
_osx_support.customize_compiler(_config_vars)
|
||||
_config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue