(spec, build_file)
return config_type
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.
Returns the configuration type for this project.
Returns the configuration type for this project .
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
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