def _AddAccumulatedActionsToMSVS(p, spec, actions_dict):
 for primary_input in actions_dict:
  inputs = OrderedSet()
  outputs = OrderedSet()
  descriptions = []
  commands = []
  for action in actions_dict[primary_input]:
   inputs.update(OrderedSet(action['inputs']))
   outputs.update(OrderedSet(action['outputs']))
   descriptions.append(action['description'])
   commands.append(action['command'])
  description = ', and also '.join(descriptions)
  command = '\r\n'.join(commands)
  _AddCustomBuildToolForMSVS(p, spec, primary_input=primary_input, inputs=inputs, outputs=outputs, description=description, cmd=command)

def _AddAccumulatedActionsToMSVS ( p , spec , actions_dict ) : for primary_input in actions_dict : inputs = OrderedSet ( ) outputs = OrderedSet ( ) descriptions = [ ] commands = [ ] for action in actions_dict [ primary_input ] : inputs . update ( OrderedSet ( action [ 'inputs' ] ) ) outputs . update ( OrderedSet ( action [ 'outputs' ] ) ) descriptions . append ( action [ 'description' ] ) commands . append ( action [ 'command' ] ) description = ', and also ' . join ( descriptions ) command = '\r\n' . join ( commands ) _AddCustomBuildToolForMSVS ( p , spec , primary_input = primary_input , inputs = inputs , outputs = outputs , description = description , cmd = command )
add actions accumulated into an actions_dict .