def archFor(filepath):
 name = path.basename(filepath)
 if (('amd64' in name) or ('x86_64' in name)):
  arch = 'x86_64'
 elif (('i386' in name) or ('32' in name) or ('x86' in name)):
  arch = 'i386'
 elif ('64' in name):
  arch = 'x86_64'
 else:
  log("Error: can't discern CPU for name", name)
  exit(1)
 return arch

def archFor ( filepath ) : name = path . basename ( filepath ) if ( ( 'amd64' in name ) or ( 'x86_64' in name ) ) : arch = 'x86_64' elif ( ( 'i386' in name ) or ( '32' in name ) or ( 'x86' in name ) ) : arch = 'i386' elif ( '64' in name ) : arch = 'x86_64' else : log ( "Error: can't discern CPU for name" , name ) exit ( 1 ) return arch
guess architecture for file path .