parameters: (spec, build_file)
return_statement: return config_type
docstring: Returns the configuration type for this project.
  
    It's a number defined by Microsoft.  May raise an exception.
  
    Args:
        spec: The target dictionary containing the properties of the target.
        build_file: The path of the gyp file.
    Returns:
        An integer, the configuration type.
docstring_summary: Returns the configuration type for this project.
docstring_tokens: Returns the configuration type for this project .
function: def _GetMSVSConfigurationType(spec, build_file):
    """Returns the configuration type for this project.
  
    It's a number defined by Microsoft.  May raise an exception.
  
    Args:
        spec: The target dictionary containing the properties of the target.
        build_file: The path of the gyp file.
    Returns:
        An integer, the configuration type.
    """
    try:
      config_type = {
          'executable': '1',  # .exe
          'shared_library': '2',  # .dll
          'loadable_module': '2',  # .dll
          'static_library': '4',  # .lib
          'none': '10',  # Utility type
          }[spec['type']]
    except KeyError:
      if spec.get('type'):
        raise GypError('Target type %s is not a valid target type for '
                       'target %s in %s.' %
                       (spec['type'], spec['target_name'], build_file))
      else:
        raise GypError('Missing type field for target %s in %s.' %
                       (spec['target_name'], build_file))
    return config_type
function_tokens: def _GetMSVSConfigurationType ( spec , build_file ) : try : config_type = { 'executable' : '1' , # .exe 'shared_library' : '2' , # .dll 'loadable_module' : '2' , # .dll 'static_library' : '4' , # .lib 'none' : '10' , # Utility type } [ spec [ 'type' ] ] except KeyError : if spec . get ( 'type' ) : raise GypError ( 'Target type %s is not a valid target type for ' 'target %s in %s.' % ( spec [ 'type' ] , spec [ 'target_name' ] , build_file ) ) else : raise GypError ( 'Missing type field for target %s in %s.' % ( spec [ 'target_name' ] , build_file ) ) return config_type