parameters: (_config_vars)
return_statement: return _config_vars
docstring: Remove references to any SDKs not available
docstring_summary: Remove references to any SDKs not available
docstring_tokens: Remove references to any SDKs not available
function: def _check_for_unavailable_sdk(_config_vars):
      """Remove references to any SDKs not available"""
      # If we're on OSX 10.5 or later and the user tries to
      # compile an extension using an SDK that is not present
      # on the current machine it is better to not use an SDK
      # than to fail.  This is particularly important with
      # the standalong Command Line Tools alternative to a
      # full-blown Xcode install since the CLT packages do not
      # provide SDKs.  If the SDK is not present, it is assumed
      # that the header files and dev libs have been installed
      # to /usr and /System/Library by either a standalone CLT
      # package or the CLT component within Xcode.
      cflags = _config_vars.get('CFLAGS', '')
      m = re.search(r'-isysroot\s+(\S+)', cflags)
      if m is not None:
          sdk = m.group(1)
          if not os.path.exists(sdk):
              for cv in _UNIVERSAL_CONFIG_VARS:
                  # Do not alter a config var explicitly overriden by env var
                  if cv in _config_vars and cv not in os.environ:
                      flags = _config_vars[cv]
                      flags = re.sub(r'-isysroot\s+\S+(?:\s|$)', ' ', flags)
                      _save_modified_value(_config_vars, cv, flags)
  
      return _config_vars
function_tokens: def _check_for_unavailable_sdk ( _config_vars ) : # If we're on OSX 10.5 or later and the user tries to # compile an extension using an SDK that is not present # on the current machine it is better to not use an SDK # than to fail.  This is particularly important with # the standalong Command Line Tools alternative to a # full-blown Xcode install since the CLT packages do not # provide SDKs.  If the SDK is not present, it is assumed # that the header files and dev libs have been installed # to /usr and /System/Library by either a standalone CLT # package or the CLT component within Xcode. cflags = _config_vars . get ( 'CFLAGS' , '' ) m = re . search ( r'-isysroot\s+(\S+)' , cflags ) if m is not None : sdk = m . group ( 1 ) if not os . path . exists ( sdk ) : for cv in _UNIVERSAL_CONFIG_VARS : # Do not alter a config var explicitly overriden by env var if cv in _config_vars and cv not in os . environ : flags = _config_vars [ cv ] flags = re . sub ( r'-isysroot\s+\S+(?:\s|$)' , ' ' , flags ) _save_modified_value ( _config_vars , cv , flags ) return _config_vars