def customize_compiler(compiler):
 if (compiler.compiler_type == 'unix'):
  if (sys.platform == 'darwin'):
   global _config_vars
   if (not get_config_var('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')
  if ('CC' in os.environ):
   newcc = os.environ['CC']
   if ((sys.platform == 'darwin') and ('LDSHARED' not in os.environ) and ldshared.startswith(cc)):
    ldshared = (newcc + ldshared[len(cc):])
   cc = newcc
  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')
  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

def customize_compiler ( compiler ) : if ( compiler . compiler_type == 'unix' ) : if ( sys . platform == 'darwin' ) : global _config_vars if ( not get_config_var ( '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' ) if ( 'CC' in os . environ ) : newcc = os . environ [ 'CC' ] if ( ( sys . platform == 'darwin' ) and ( 'LDSHARED' not in os . environ ) and ldshared . startswith ( cc ) ) : ldshared = ( newcc + ldshared [ len ( cc ) : ] ) cc = newcc 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' ) 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
customize compiler path and configuration variables .