parameters: (compiler)
docstring: Do any platform-specific customization of a CCompiler instance.
  
      Mainly needed on Unix, so we can plug in the information that
      varies across Unices and is stored in Python's Makefile.
docstring_summary: Do any platform-specific customization of a CCompiler instance.
docstring_tokens: Do any platform - specific customization of a CCompiler instance .
function: def customize_compiler(compiler):
      """Do any platform-specific customization of a CCompiler instance.
  
      Mainly needed on Unix, so we can plug in the information that
      varies across Unices and is stored in Python's Makefile.
      """
      if compiler.compiler_type == "unix":
          if sys.platform == "darwin":
              # Perform first-time customization of compiler-related
              # config vars on OS X now that we know we need a compiler.
              # This is primarily to support Pythons from binary
              # installers.  The kind and paths to build tools on
              # the user system may vary significantly from the system
              # 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)
                  _config_vars['CUSTOMIZED_OSX_COMPILER'] = 'True'
  
          (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \
              get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
                              'CCSHARED', 'LDSHARED', 'SO', 'AR',
                              'ARFLAGS')
  
          newcc = None
          if 'CC' in os.environ:
              cc = os.environ['CC']
          if 'CXX' in os.environ:
              cxx = os.environ['CXX']
          if 'LDSHARED' in os.environ:
              ldshared = os.environ['LDSHARED']
          if 'CPP' in os.environ:
              cpp = os.environ['CPP']
          else:
              cpp = cc + " -E"           # not always
          if 'LDFLAGS' in os.environ:
              ldshared = ldshared + ' ' + os.environ['LDFLAGS']
          if 'CFLAGS' in os.environ:
              cflags = opt + ' ' + os.environ['CFLAGS']
              ldshared = ldshared + ' ' + os.environ['CFLAGS']
          if 'CPPFLAGS' in os.environ:
              cpp = cpp + ' ' + os.environ['CPPFLAGS']
              cflags = cflags + ' ' + os.environ['CPPFLAGS']
              ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
          if 'AR' in os.environ:
              ar = os.environ['AR']
          if 'ARFLAGS' in os.environ:
              archiver = ar + ' ' + os.environ['ARFLAGS']
          else:
              archiver = ar + ' ' + ar_flags
  
          cc_cmd = cc + ' ' + cflags
          compiler.set_executables(
              preprocessor=cpp,
              compiler=cc_cmd,
              compiler_so=cc_cmd + ' ' + ccshared,
              compiler_cxx=cxx,
              linker_so=ldshared,
              linker_exe=cc,
              archiver=archiver)
  
          compiler.shared_lib_extension = so_ext
function_tokens: def customize_compiler ( compiler ) : if compiler . compiler_type == "unix" : if sys . platform == "darwin" : # Perform first-time customization of compiler-related # config vars on OS X now that we know we need a compiler. # This is primarily to support Pythons from binary # installers.  The kind and paths to build tools on # the user system may vary significantly from the system # 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 ) _config_vars [ 'CUSTOMIZED_OSX_COMPILER' ] = 'True' ( cc , cxx , opt , cflags , ccshared , ldshared , so_ext , ar , ar_flags ) = get_config_vars ( 'CC' , 'CXX' , 'OPT' , 'CFLAGS' , 'CCSHARED' , 'LDSHARED' , 'SO' , 'AR' , 'ARFLAGS' ) newcc = None if 'CC' in os . environ : cc = os . environ [ 'CC' ] if 'CXX' in os . environ : cxx = os . environ [ 'CXX' ] if 'LDSHARED' in os . environ : ldshared = os . environ [ 'LDSHARED' ] if 'CPP' in os . environ : cpp = os . environ [ 'CPP' ] else : cpp = cc + " -E" # not always if 'LDFLAGS' in os . environ : ldshared = ldshared + ' ' + os . environ [ 'LDFLAGS' ] if 'CFLAGS' in os . environ : cflags = opt + ' ' + os . environ [ 'CFLAGS' ] ldshared = ldshared + ' ' + os . environ [ 'CFLAGS' ] if 'CPPFLAGS' in os . environ : cpp = cpp + ' ' + os . environ [ 'CPPFLAGS' ] cflags = cflags + ' ' + os . environ [ 'CPPFLAGS' ] ldshared = ldshared + ' ' + os . environ [ 'CPPFLAGS' ] if 'AR' in os . environ : ar = os . environ [ 'AR' ] if 'ARFLAGS' in os . environ : archiver = ar + ' ' + os . environ [ 'ARFLAGS' ] else : archiver = ar + ' ' + ar_flags cc_cmd = cc + ' ' + cflags compiler . set_executables ( preprocessor = cpp , compiler = cc_cmd , compiler_so = cc_cmd + ' ' + ccshared , compiler_cxx = cxx , linker_so = ldshared , linker_exe = cc , archiver = archiver ) compiler . shared_lib_extension = so_ext