def _GetMSBuildPropertyGroup(spec, label, properties):
 group = ['PropertyGroup']
 if label:
  group.append({'Label': label})
 num_configurations = len(spec['configurations'])
 def GetEdges(node):
  edges = set()
  for value in sorted(properties[node].keys()):
   edges.update(set([v for v in MSVS_VARIABLE_REFERENCE.findall(value) if ((v in properties) and (v != node))]))
  return edges
 properties_ordered = gyp.common.TopologicallySorted(properties.keys(), GetEdges)
 for name in reversed(properties_ordered):
  values = properties[name]
  for (value, conditions) in sorted(values.iteritems()):
   if (len(conditions) == num_configurations):
    group.append([name, value])
   else:
    for condition in conditions:
     group.append([name, {'Condition': condition}, value])
 return [group]

def _GetMSBuildPropertyGroup ( spec , label , properties ) : group = [ 'PropertyGroup' ] if label : group . append ( { 'Label' : label } ) num_configurations = len ( spec [ 'configurations' ] ) def GetEdges ( node ) : edges = set ( ) for value in sorted ( properties [ node ] . keys ( ) ) : edges . update ( set ( [ v for v in MSVS_VARIABLE_REFERENCE . findall ( value ) if ( ( v in properties ) and ( v != node ) ) ] ) ) return edges properties_ordered = gyp . common . TopologicallySorted ( properties . keys ( ) , GetEdges ) for name in reversed ( properties_ordered ) : values = properties [ name ] for ( value , conditions ) in sorted ( values . iteritems ( ) ) : if ( len ( conditions ) == num_configurations ) : group . append ( [ name , value ] ) else : for condition in conditions : group . append ( [ name , { 'Condition' : condition } , value ] ) return [ group ]
returns a propertygroup definition for the specified properties .