@@ -451,7 +451,7 @@ def _AddCustomBuildToolForMSVS(p, spec, primary_input,
451451'CommandLine' : cmd ,
452452 })
453453# Add to the properties of primary input for each config.
454- for config_name , c_data in spec ['configurations' ].iteritems ():
454+ for config_name , c_data in spec ['configurations' ].items ():
455455p .AddFileConfig (_FixPath (primary_input ),
456456_ConfigFullName (config_name , c_data ), tools = [tool ])
457457
@@ -971,7 +971,7 @@ def _ValidateSourcesForMSVSProject(spec, version):
971971basenames .setdefault (basename , []).append (source )
972972
973973error = ''
974- for basename , files in basenames .iteritems ():
974+ for basename , files in basenames .items ():
975975if len (files ) > 1 :
976976error += ' %s: %s\n ' % (basename , ' ' .join (files ))
977977
@@ -1003,7 +1003,7 @@ def _GenerateMSVSProject(project, options, version, generator_flags):
10031003relative_path_of_gyp_file = gyp .common .RelativePath (gyp_path , project_dir )
10041004
10051005config_type = _GetMSVSConfigurationType (spec , project .build_file )
1006- for config_name , config in spec ['configurations' ].iteritems ():
1006+ for config_name , config in spec ['configurations' ].items ():
10071007_AddConfigurationToMSVSProject (p , spec , config_type , config_name , config )
10081008
10091009# MSVC08 and prior version cannot handle duplicate basenames in the same
@@ -1369,10 +1369,10 @@ def _ConvertToolsToExpectedForm(tools):
13691369 A list of Tool objects.
13701370 """
13711371tool_list = []
1372- for tool , settings in tools .iteritems ():
1372+ for tool , settings in tools .items ():
13731373# Collapse settings with lists.
13741374settings_fixed = {}
1375- for setting , value in settings .iteritems ():
1375+ for setting , value in settings .items ():
13761376if type (value ) == list :
13771377if ((tool == 'VCLinkerTool' and
13781378setting == 'AdditionalDependencies' ) or
@@ -1547,7 +1547,7 @@ def _IdlFilesHandledNonNatively(spec, sources):
15471547def _GetPrecompileRelatedFiles (spec ):
15481548# Gather a list of precompiled header related sources.
15491549precompiled_related = []
1550- for _ , config in spec ['configurations' ].iteritems ():
1550+ for _ , config in spec ['configurations' ].items ():
15511551for k in precomp_keys :
15521552f = config .get (k )
15531553if f :
@@ -1558,7 +1558,7 @@ def _GetPrecompileRelatedFiles(spec):
15581558def _ExcludeFilesFromBeingBuilt (p , spec , excluded_sources , excluded_idl ,
15591559list_excluded ):
15601560exclusions = _GetExcludedFilesFromBuild (spec , excluded_sources , excluded_idl )
1561- for file_name , excluded_configs in exclusions .iteritems ():
1561+ for file_name , excluded_configs in exclusions .items ():
15621562if (not list_excluded and
15631563len (excluded_configs ) == len (spec ['configurations' ])):
15641564# If we're not listing excluded files, then they won't appear in the
@@ -1575,7 +1575,7 @@ def _GetExcludedFilesFromBuild(spec, excluded_sources, excluded_idl):
15751575# Exclude excluded sources from being built.
15761576for f in excluded_sources :
15771577excluded_configs = []
1578- for config_name , config in spec ['configurations' ].iteritems ():
1578+ for config_name , config in spec ['configurations' ].items ():
15791579precomped = [_FixPath (config .get (i , '' )) for i in precomp_keys ]
15801580# Don't do this for ones that are precompiled header related.
15811581if f not in precomped :
@@ -1585,7 +1585,7 @@ def _GetExcludedFilesFromBuild(spec, excluded_sources, excluded_idl):
15851585# Exclude them now.
15861586for f in excluded_idl :
15871587excluded_configs = []
1588- for config_name , config in spec ['configurations' ].iteritems ():
1588+ for config_name , config in spec ['configurations' ].items ():
15891589excluded_configs .append ((config_name , config ))
15901590exclusions [f ] = excluded_configs
15911591return exclusions
@@ -1594,7 +1594,7 @@ def _GetExcludedFilesFromBuild(spec, excluded_sources, excluded_idl):
15941594def _AddToolFilesToMSVS (p , spec ):
15951595# Add in tool files (rules).
15961596tool_files = OrderedSet ()
1597- for _ , config in spec ['configurations' ].iteritems ():
1597+ for _ , config in spec ['configurations' ].items ():
15981598for f in config .get ('msvs_tool_files' , []):
15991599tool_files .add (f )
16001600for f in tool_files :
@@ -1607,7 +1607,7 @@ def _HandlePreCompiledHeaders(p, sources, spec):
16071607# kind (i.e. C vs. C++) as the precompiled header source stub needs
16081608# to have use of precompiled headers disabled.
16091609extensions_excluded_from_precompile = []
1610- for config_name , config in spec ['configurations' ].iteritems ():
1610+ for config_name , config in spec ['configurations' ].items ():
16111611source = config .get ('msvs_precompiled_source' )
16121612if source :
16131613source = _FixPath (source )
@@ -1628,7 +1628,7 @@ def DisableForSourceTree(source_tree):
16281628else :
16291629basename , extension = os .path .splitext (source )
16301630if extension in extensions_excluded_from_precompile :
1631- for config_name , config in spec ['configurations' ].iteritems ():
1631+ for config_name , config in spec ['configurations' ].items ():
16321632tool = MSVSProject .Tool ('VCCLCompilerTool' ,
16331633 {'UsePrecompiledHeader' : '0' ,
16341634'ForcedIncludeFiles' : '$(NOINHERIT)' })
@@ -1679,7 +1679,7 @@ def _WriteMSVSUserFile(project_path, version, spec):
16791679return # Nothing to add
16801680# Write out the user file.
16811681user_file = _CreateMSVSUserFile (project_path , version , spec )
1682- for config_name , c_data in spec ['configurations' ].iteritems ():
1682+ for config_name , c_data in spec ['configurations' ].items ():
16831683user_file .AddDebugSettings (_ConfigFullName (config_name , c_data ),
16841684action , environment , working_directory )
16851685user_file .WriteIfChanged ()
@@ -1730,7 +1730,7 @@ def _GetPathDict(root, path):
17301730def _DictsToFolders (base_path , bucket , flat ):
17311731# Convert to folders recursively.
17321732children = []
1733- for folder , contents in bucket .iteritems ():
1733+ for folder , contents in bucket .items ():
17341734if type (contents ) == dict :
17351735folder_children = _DictsToFolders (os .path .join (base_path , folder ),
17361736contents , flat )
@@ -1802,7 +1802,7 @@ def _GetPlatformOverridesOfProject(spec):
18021802# Prepare a dict indicating which project configurations are used for which
18031803# solution configurations for this target.
18041804config_platform_overrides = {}
1805- for config_name , c in spec ['configurations' ].iteritems ():
1805+ for config_name , c in spec ['configurations' ].items ():
18061806config_fullname = _ConfigFullName (config_name , c )
18071807platform = c .get ('msvs_target_platform' , _ConfigPlatform (c ))
18081808fixed_config_fullname = '%s|%s' % (
@@ -1941,7 +1941,7 @@ def PerformBuild(data, configurations, params):
19411941msvs_version = params ['msvs_version' ]
19421942devenv = os .path .join (msvs_version .path , 'Common7' , 'IDE' , 'devenv.com' )
19431943
1944- for build_file , build_file_dict in data .iteritems ():
1944+ for build_file , build_file_dict in data .items ():
19451945 (build_file_root , build_file_ext ) = os .path .splitext (build_file )
19461946if build_file_ext != '.gyp' :
19471947continue
@@ -1990,7 +1990,7 @@ def GenerateOutput(target_list, target_dicts, data, params):
19901990configs = set ()
19911991for qualified_target in target_list :
19921992spec = target_dicts [qualified_target ]
1993- for config_name , config in spec ['configurations' ].iteritems ():
1993+ for config_name , config in spec ['configurations' ].items ():
19941994configs .add (_ConfigFullName (config_name , config ))
19951995configs = list (configs )
19961996
@@ -2630,7 +2630,7 @@ def _GetConfigurationCondition(name, settings):
26302630
26312631def _GetMSBuildProjectConfigurations (configurations ):
26322632group = ['ItemGroup' , {'Label' : 'ProjectConfigurations' }]
2633- for (name , settings ) in sorted (configurations .iteritems ()):
2633+ for (name , settings ) in sorted (configurations .items ()):
26342634configuration , platform = _GetConfigurationAndPlatform (name , settings )
26352635designation = '%s|%s' % (configuration , platform )
26362636group .append (
@@ -2700,7 +2700,7 @@ def _GetMSBuildGlobalProperties(spec, guid, gyp_file_name):
27002700
27012701def _GetMSBuildConfigurationDetails (spec , build_file ):
27022702properties = {}
2703- for name , settings in spec ['configurations' ].iteritems ():
2703+ for name , settings in spec ['configurations' ].items ():
27042704msbuild_attributes = _GetMSBuildAttributes (spec , settings , build_file )
27052705condition = _GetConfigurationCondition (name , settings )
27062706character_set = msbuild_attributes .get ('CharacterSet' )
@@ -2729,7 +2729,7 @@ def _GetMSBuildPropertySheets(configurations):
27292729user_props = r'$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props'
27302730additional_props = {}
27312731props_specified = False
2732- for name , settings in sorted (configurations .iteritems ()):
2732+ for name , settings in sorted (configurations .items ()):
27332733configuration = _GetConfigurationCondition (name , settings )
27342734if 'msbuild_props' in settings :
27352735additional_props [configuration ] = _FixPaths (settings ['msbuild_props' ])
@@ -2751,7 +2751,7 @@ def _GetMSBuildPropertySheets(configurations):
27512751 ]
27522752else :
27532753sheets = []
2754- for condition , props in additional_props .iteritems ():
2754+ for condition , props in additional_props .items ():
27552755import_group = [
27562756'ImportGroup' ,
27572757 {'Label' : 'PropertySheets' ,
@@ -2878,7 +2878,7 @@ def _GetMSBuildConfigurationGlobalProperties(spec, configurations, build_file):
28782878new_paths = '$(ExecutablePath);' + ';' .join (new_paths )
28792879
28802880properties = {}
2881- for (name , configuration ) in sorted (configurations .iteritems ()):
2881+ for (name , configuration ) in sorted (configurations .items ()):
28822882condition = _GetConfigurationCondition (name , configuration )
28832883attributes = _GetMSBuildAttributes (spec , configuration , build_file )
28842884msbuild_settings = configuration ['finalized_msbuild_settings' ]
@@ -2903,7 +2903,7 @@ def _GetMSBuildConfigurationGlobalProperties(spec, configurations, build_file):
29032903_AddConditionalProperty (properties , condition , 'ExecutablePath' ,
29042904new_paths )
29052905tool_settings = msbuild_settings .get ('' , {})
2906- for name , value in sorted (tool_settings .iteritems ()):
2906+ for name , value in sorted (tool_settings .items ()):
29072907formatted_value = _GetValueFormattedForMSBuild ('' , name , value )
29082908_AddConditionalProperty (properties , condition , name , formatted_value )
29092909return _GetMSBuildPropertyGroup (spec , None , properties )
@@ -2972,7 +2972,7 @@ def GetEdges(node):
29722972# NOTE: reverse(topsort(DAG)) = topsort(reverse_edges(DAG))
29732973for name in reversed (properties_ordered ):
29742974values = properties [name ]
2975- for value , conditions in sorted (values .iteritems ()):
2975+ for value , conditions in sorted (values .items ()):
29762976if len (conditions ) == num_configurations :
29772977# If the value is the same all configurations,
29782978# just add one unconditional entry.
@@ -2985,18 +2985,18 @@ def GetEdges(node):
29852985
29862986def _GetMSBuildToolSettingsSections (spec , configurations ):
29872987groups = []
2988- for (name , configuration ) in sorted (configurations .iteritems ()):
2988+ for (name , configuration ) in sorted (configurations .items ()):
29892989msbuild_settings = configuration ['finalized_msbuild_settings' ]
29902990group = ['ItemDefinitionGroup' ,
29912991 {'Condition' : _GetConfigurationCondition (name , configuration )}
29922992 ]
2993- for tool_name , tool_settings in sorted (msbuild_settings .iteritems ()):
2993+ for tool_name , tool_settings in sorted (msbuild_settings .items ()):
29942994# Skip the tool named '' which is a holder of global settings handled
29952995# by _GetMSBuildConfigurationGlobalProperties.
29962996if tool_name :
29972997if tool_settings :
29982998tool = [tool_name ]
2999- for name , value in sorted (tool_settings .iteritems ()):
2999+ for name , value in sorted (tool_settings .items ()):
30003000formatted_value = _GetValueFormattedForMSBuild (tool_name , name ,
30013001value )
30023002tool .append ([name , formatted_value ])
@@ -3196,7 +3196,7 @@ def _AddSources2(spec, sources, exclusions, grouped_sources,
31963196 {'Condition' : condition },
31973197'true' ])
31983198# Add precompile if needed
3199- for config_name , configuration in spec ['configurations' ].iteritems ():
3199+ for config_name , configuration in spec ['configurations' ].items ():
32003200precompiled_source = configuration .get ('msvs_precompiled_source' , '' )
32013201if precompiled_source != '' :
32023202precompiled_source = _FixPath (precompiled_source )
@@ -3436,7 +3436,7 @@ def _GenerateActionsForMSBuild(spec, actions_to_add):
34363436 """
34373437sources_handled_by_action = OrderedSet ()
34383438actions_spec = []
3439- for primary_input , actions in actions_to_add .iteritems ():
3439+ for primary_input , actions in actions_to_add .items ():
34403440inputs = OrderedSet ()
34413441outputs = OrderedSet ()
34423442descriptions = []
0 commit comments