@@ -800,7 +800,7 @@ def Write(self, qualified_target, base_path, output_filename, spec, configs,
800800 gyp .xcode_emulation .MacPrefixHeader (
801801 self .xcode_settings , lambda p : Sourceify (self .Absolutify (p )),
802802 self .Pchify ))
803- sources = filter (Compilable , all_sources )
803+ sources = list ( filter (Compilable , all_sources ) )
804804 if sources :
805805 self .WriteLn (SHARED_HEADER_SUFFIX_RULES_COMMENT1 )
806806 extensions = set ([os .path .splitext (s )[1 ] for s in sources ])
@@ -953,7 +953,7 @@ def WriteActions(self, actions, extra_sources, extra_outputs,
953953 outputs = [gyp .xcode_emulation .ExpandEnvVars (o , env ) for o in outputs ]
954954 inputs = [gyp .xcode_emulation .ExpandEnvVars (i , env ) for i in inputs ]
955955
956- self .WriteDoCmd (outputs , map ( Sourceify , map (self .Absolutify , inputs )) ,
956+ self .WriteDoCmd (outputs , [ Sourceify (self .Absolutify ( i )) for i in inputs ] ,
957957 part_of_all = part_of_all , command = name )
958958
959959 # Stuff the outputs in a variable so we can refer to them later.
@@ -1002,8 +1002,8 @@ def WriteRules(self, rules, extra_sources, extra_outputs,
10021002 extra_sources += outputs
10031003 if int (rule .get ('process_outputs_as_mac_bundle_resources' , False )):
10041004 extra_mac_bundle_resources += outputs
1005- inputs = map ( Sourceify , map (self .Absolutify , [ rule_source ] +
1006- rule .get ('inputs' , [])))
1005+ inputs = [ Sourceify (self .Absolutify ( i )) for i
1006+ in [ rule_source ] + rule .get ('inputs' , [])]
10071007 actions = ['$(call do_cmd,%s_%d)' % (name , count )]
10081008
10091009 if name == 'resources_grit' :
@@ -1126,7 +1126,7 @@ def WriteCopies(self, copies, extra_outputs, part_of_all):
11261126 path = gyp .xcode_emulation .ExpandEnvVars (path , env )
11271127 self .WriteDoCmd ([output ], [path ], 'copy' , part_of_all )
11281128 outputs .append (output )
1129- self .WriteLn ('%s = %s' % (variable , ' ' .join (map ( QuoteSpaces , outputs ) )))
1129+ self .WriteLn ('%s = %s' % (variable , ' ' .join (QuoteSpaces ( o ) for o in outputs )))
11301130 extra_outputs .append ('$(%s)' % variable )
11311131 self .WriteLn ()
11321132
@@ -1137,7 +1137,7 @@ def WriteMacBundleResources(self, resources, bundle_deps):
11371137
11381138 for output , res in gyp .xcode_emulation .GetMacBundleResources (
11391139 generator_default_variables ['PRODUCT_DIR' ], self .xcode_settings ,
1140- map ( Sourceify , map (self .Absolutify , resources )) ):
1140+ [ Sourceify (self .Absolutify ( r )) for r in resources ] ):
11411141 _ , ext = os .path .splitext (output )
11421142 if ext != '.xcassets' :
11431143 # Make does not supports '.xcassets' emulation.
@@ -1217,11 +1217,11 @@ def WriteSources(self, configs, deps, sources,
12171217 self .WriteList (cflags_objcc , 'CFLAGS_OBJCC_%s' % configname )
12181218 includes = config .get ('include_dirs' )
12191219 if includes :
1220- includes = map ( Sourceify , map (self .Absolutify , includes ))
1220+ includes = [ Sourceify (self .Absolutify ( i )) for i in includes ]
12211221 self .WriteList (includes , 'INCS_%s' % configname , prefix = '-I' )
12221222
1223- compilable = filter (Compilable , sources )
1224- objs = map ( self .Objectify , map (self .Absolutify , map (Target , compilable )))
1223+ compilable = list ( filter (Compilable , sources ) )
1224+ objs = [ self .Objectify (self .Absolutify (Target ( c ))) for c in compilable ]
12251225 self .WriteList (objs , 'OBJS' )
12261226
12271227 for obj in objs :
@@ -1293,7 +1293,7 @@ def WriteSources(self, configs, deps, sources,
12931293
12941294 # If there are any object files in our input file list, link them into our
12951295 # output.
1296- extra_link_deps += filter (Linkable , sources )
1296+ extra_link_deps += list ( filter (Linkable , sources ) )
12971297
12981298 self .WriteLn ()
12991299
@@ -1543,7 +1543,7 @@ def WriteTarget(self, spec, configs, deps, link_deps, bundle_deps,
15431543
15441544 # Bundle dependencies. Note that the code below adds actions to this
15451545 # target, so if you move these two lines, move the lines below as well.
1546- self .WriteList (map ( QuoteSpaces , bundle_deps ) , 'BUNDLE_DEPS' )
1546+ self .WriteList ([ QuoteSpaces ( dep ) for dep in bundle_deps ] , 'BUNDLE_DEPS' )
15471547 self .WriteLn ('%s: $(BUNDLE_DEPS)' % QuoteSpaces (self .output ))
15481548
15491549 # After the framework is built, package it. Needs to happen before
@@ -1577,7 +1577,7 @@ def WriteTarget(self, spec, configs, deps, link_deps, bundle_deps,
15771577 if self .type == 'executable' :
15781578 self .WriteLn ('%s: LD_INPUTS := %s' % (
15791579 QuoteSpaces (self .output_binary ),
1580- ' ' .join (map ( QuoteSpaces , link_deps ) )))
1580+ ' ' .join (QuoteSpaces ( dep ) for dep in link_deps )))
15811581 if self .toolset == 'host' and self .flavor == 'android' :
15821582 self .WriteDoCmd ([self .output_binary ], link_deps , 'link_host' ,
15831583 part_of_all , postbuilds = postbuilds )
@@ -1599,7 +1599,7 @@ def WriteTarget(self, spec, configs, deps, link_deps, bundle_deps,
15991599 elif self .type == 'shared_library' :
16001600 self .WriteLn ('%s: LD_INPUTS := %s' % (
16011601 QuoteSpaces (self .output_binary ),
1602- ' ' .join (map ( QuoteSpaces , link_deps ) )))
1602+ ' ' .join (QuoteSpaces ( dep ) for dep in link_deps )))
16031603 self .WriteDoCmd ([self .output_binary ], link_deps , 'solink' , part_of_all ,
16041604 postbuilds = postbuilds )
16051605 elif self .type == 'loadable_module' :
@@ -1815,7 +1815,7 @@ def WriteAndroidNdkModuleRule(self, module_name, all_sources, link_deps):
18151815 default_cpp_ext = ext
18161816 self .WriteLn ('LOCAL_CPP_EXTENSION := ' + default_cpp_ext )
18171817
1818- self .WriteList (map (self .Absolutify , filter (Compilable , all_sources )),
1818+ self .WriteList (list ( map (self .Absolutify , filter (Compilable , all_sources ) )),
18191819 'LOCAL_SRC_FILES' )
18201820
18211821 # Filter out those which do not match prefix and suffix and produce
@@ -1956,7 +1956,7 @@ def WriteAutoRegenerationRule(params, root_makefile, makefile_name,
19561956 "%(makefile_name)s: %(deps)s\n "
19571957 "\t $(call do_cmd,regen_makefile)\n \n " % {
19581958 'makefile_name' : makefile_name ,
1959- 'deps' : ' ' .join (map ( Sourceify , build_files ) ),
1959+ 'deps' : ' ' .join (Sourceify ( bf ) for bf in build_files ),
19601960 'cmd' : gyp .common .EncodePOSIXShellList (
19611961 [gyp_binary , '-fmake' ] +
19621962 gyp .RegenerateFlags (options ) +
0 commit comments