def CopyTool(flavor, out_path, generator_flags={}):
 prefix = {'aix': 'flock', 'solaris': 'flock', 'mac': 'mac', 'win': 'win'}.get(flavor, None)
 if (not prefix):
  return
 source_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), ('%s_tool.py' % prefix))
 with open(source_path) as source_file:
  source = source_file.readlines()
 header = '# Generated by gyp. Do not edit.\n'
 mac_toolchain_dir = generator_flags.get('mac_toolchain_dir', None)
 if ((flavor == 'mac') and mac_toolchain_dir):
  header += ("import os;\nos.environ['DEVELOPER_DIR']='%s'\n" % mac_toolchain_dir)
 tool_path = os.path.join(out_path, ('gyp-%s-tool' % prefix))
 with open(tool_path, 'w') as tool_file:
  tool_file.write(''.join(([source[0], header] + source[1:])))
 os.chmod(tool_path, 493)

def CopyTool ( flavor , out_path , generator_flags = { } ) : prefix = { 'aix' : 'flock' , 'solaris' : 'flock' , 'mac' : 'mac' , 'win' : 'win' } . get ( flavor , None ) if ( not prefix ) : return source_path = os . path . join ( os . path . dirname ( os . path . abspath ( __file__ ) ) , ( '%s_tool.py' % prefix ) ) with open ( source_path ) as source_file : source = source_file . readlines ( ) header = '# Generated by gyp. Do not edit.\n' mac_toolchain_dir = generator_flags . get ( 'mac_toolchain_dir' , None ) if ( ( flavor == 'mac' ) and mac_toolchain_dir ) : header += ( "import os;\nos.environ['DEVELOPER_DIR']='%s'\n" % mac_toolchain_dir ) tool_path = os . path . join ( out_path , ( 'gyp-%s-tool' % prefix ) ) with open ( tool_path , 'w' ) as tool_file : tool_file . write ( '' . join ( ( [ source [ 0 ] , header ] + source [ 1 : ] ) ) ) os . chmod ( tool_path , 493 )
finds _tool .