def _PrepareListOfSources(spec, generator_flags, gyp_file):
 sources = OrderedSet()
 _AddNormalizedSources(sources, spec.get('sources', []))
 excluded_sources = OrderedSet()
 if (not generator_flags.get('standalone')):
  sources.add(gyp_file)
 for a in spec.get('actions', []):
  inputs = a['inputs']
  inputs = [_NormalizedSource(i) for i in inputs]
  inputs = OrderedSet(inputs)
  sources.update(inputs)
  if (not spec.get('msvs_external_builder')):
   excluded_sources.update(inputs)
  if int(a.get('process_outputs_as_sources', False)):
   _AddNormalizedSources(sources, a.get('outputs', []))
 for cpy in spec.get('copies', []):
  _AddNormalizedSources(sources, cpy.get('files', []))
 return (sources, excluded_sources)

def _PrepareListOfSources ( spec , generator_flags , gyp_file ) : sources = OrderedSet ( ) _AddNormalizedSources ( sources , spec . get ( 'sources' , [ ] ) ) excluded_sources = OrderedSet ( ) if ( not generator_flags . get ( 'standalone' ) ) : sources . add ( gyp_file ) for a in spec . get ( 'actions' , [ ] ) : inputs = a [ 'inputs' ] inputs = [ _NormalizedSource ( i ) for i in inputs ] inputs = OrderedSet ( inputs ) sources . update ( inputs ) if ( not spec . get ( 'msvs_external_builder' ) ) : excluded_sources . update ( inputs ) if int ( a . get ( 'process_outputs_as_sources' , False ) ) : _AddNormalizedSources ( sources , a . get ( 'outputs' , [ ] ) ) for cpy in spec . get ( 'copies' , [ ] ) : _AddNormalizedSources ( sources , cpy . get ( 'files' , [ ] ) ) return ( sources , excluded_sources )
prepare list of sources and excluded sources .