def make_pythonzip():
 global python_files
 d = realpath(join('private', 'lib', 'python2.7'))
 def select(fn):
  if is_blacklist(fn):
   return False
  fn = realpath(fn)
  assert fn.startswith(d)
  fn = fn[len(d):]
  if (fn.startswith('/site-packages/') or fn.startswith('/config/') or fn.startswith('/lib-dynload/') or fn.startswith('/libpymodules.so')):
   return False
  return fn
 python_files = [x for x in listfiles(d) if select(x)]
 zfn = join('private', 'lib', 'python27.zip')
 zf = ZipFile(zfn, 'w')
 for fn in python_files:
  afn = fn[len(d):]
  zf.write(fn, afn)
 zf.close()

def make_pythonzip ( ) : global python_files d = realpath ( join ( 'private' , 'lib' , 'python2.7' ) ) def select ( fn ) : if is_blacklist ( fn ) : return False fn = realpath ( fn ) assert fn . startswith ( d ) fn = fn [ len ( d ) : ] if ( fn . startswith ( '/site-packages/' ) or fn . startswith ( '/config/' ) or fn . startswith ( '/lib-dynload/' ) or fn . startswith ( '/libpymodules.so' ) ) : return False return fn python_files = [ x for x in listfiles ( d ) if select ( x ) ] zfn = join ( 'private' , 'lib' , 'python27.zip' ) zf = ZipFile ( zfn , 'w' ) for fn in python_files : afn = fn [ len ( d ) : ] zf . write ( fn , afn ) zf . close ( )
search for all the python related files .