Module Expr Str Import alias Import alias Import alias Import alias Import alias If CompareEq AttributeLoad NameLoad attr Str body ImportFrom alias Import alias Import alias Assign NameStore Str Import alias ImportFrom alias alias FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr For NameStore Call AttributeLoad NameLoad attr Str TupleLoad body Expr Call AttributeLoad NameLoad attr NameLoad For NameStore Call AttributeLoad NameLoad attr Str TupleLoad body Expr Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd CompareNotIn Str NameLoad CompareNotIn Str NameLoad body Expr Call AttributeLoad NameLoad attr Str If BoolOpAnd CompareNotIn Str NameLoad CompareNotIn Str NameLoad body Expr Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str decorator_list Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign NameStore Dict For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Call NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore ListLoad For NameStore Call AttributeLoad NameLoad attr body Assign NameStore NameLoad If BoolOpAnd AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Str For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr orelse For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Str Raise Call NameLoad NameLoad Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body If CompareEq AttributeLoad NameLoad attr Str body Pass Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Str attr NameLoad For NameStore Call AttributeLoad NameLoad attr keyword NameLoad body If UnaryOpNot AttributeLoad NameLoad attr body Continue Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse If CompareEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad NameLoad BinOpAdd NameLoad Str Assign NameStore Call NameLoad Str Str Assign NameStore Call NameLoad Str Str If CompareNotIn Str AttributeLoad NameLoad attr body For NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr NameLoad For NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body If Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad For NameStore Call AttributeLoad NameLoad attr keyword NameLoad body If UnaryOpNot AttributeLoad NameLoad attr body Continue Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str AttributeLoad NameLoad attr Assign NameStore TupleLoad Num Num Num Num Num Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str For NameStore Call NameLoad Num Call NameLoad NameLoad body If SubscriptLoad NameLoad Index NameLoad body Assign SubscriptStore NameLoad Index NameLoad BinOpAdd Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Num attr SubscriptLoad SubscriptLoad NameLoad Index NameLoad Slice Num Return Call AttributeLoad Str attr NameLoad decorator_list If CompareLt SubscriptLoad AttributeLoad NameLoad attr Index Num Num body Assign NameStore Str orelse Assign NameStore Str Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore Str
N/A N/A 

  esky.bdist_esky.f_cxfreeze:  bdist_esky support for cx_Freeze

 N/A os N/A sys N/A inspect N/A zipfile N/A distutils N/A N/A N/A sys platform win32 N/A esky winres N/A cx_Freeze N/A cx_Freeze.hooks N/A INITNAME cx_Freeze__init__ N/A esky esky.util is_core_dependency compile_to_bytecode freeze N/A N/A dist N/A N/A N/A Freeze the given distribution data using cx_Freeze. N/A includes N/A dist includes N/A excludes N/A dist excludes N/A options N/A dist freezer_options N/A inc N/A N/A options pop includes N/A N/A N/A N/A N/A includes append inc N/A exc N/A N/A options pop excludes N/A N/A N/A N/A N/A excludes append exc N/A N/A N/A esky includes N/A esky excludes N/A N/A N/A N/A includes append esky N/A N/A N/A pypy includes N/A pypy excludes N/A N/A N/A N/A excludes append pypy load_distutils N/A N/A finder module N/A N/A N/A N/A module path N/A N/A distutils __path__ N/A module path N/A N/A N/A finder IncludeModule distutils.dist N/A N/A N/A N/A cx_Freeze hooks load_distutils load_distutils N/A kwds N/A N/A N/A nm val N/A N/A options iteritems N/A N/A N/A kwds N/A N/A _normalise_opt_name nm val N/A N/A kwds N/A includes includes N/A N/A kwds N/A excludes excludes N/A N/A kwds N/A targetDir N/A dist freeze_dir N/A executables N/A N/A exe N/A N/A dist get_executables N/A N/A base None N/A N/A N/A exe gui_only N/A N/A sys platform win32 N/A N/A base Win32GUI N/A N/A N/A executables append N/A N/A cx_Freeze Executable N/A exe script base base targetName N/A exe name icon N/A exe icon N/A exe _kwds N/A f N/A N/A cx_Freeze Freezer executables kwds N/A N/A N/A f Freeze N/A N/A src dst N/A N/A dist get_data_files N/A N/A dst N/A N/A N/A os path join N/A dist freeze_dir dst N/A dstdir N/A N/A N/A os path dirname dst N/A N/A N/A N/A N/A os path isdir dstdir N/A N/A N/A N/A dist mkpath dstdir N/A N/A N/A dist copy_file src dst N/A N/A f createLibraryZip N/A N/A lib N/A N/A zipfile ZipFile N/A N/A N/A os path join N/A dist freeze_dir library.zip a N/A N/A src arcnm N/A N/A dist get_package_data N/A N/A N/A N/A lib write src arcnm N/A N/A N/A lib close N/A N/A N/A src arcnm N/A N/A dist get_package_data N/A N/A err use of package_data currently requires createLibraryZip=True N/A N/A RuntimeError err N/A code_source N/A __name__ = '__main__' N/A esky_name N/A N/A N/A dist distribution get_name N/A N/A N/A code_source append N/A __esky_name__ = %r N/A esky_name N/A N/A N/A code_source append N/A N/A inspect getsource N/A esky bootstrap N/A N/A dist compile_bootstrap_exes N/A N/A N/A N/A sys platform win32 N/A N/A N/A N/A N/A code_source append N/A N/A dist get_bootstrap_code N/A code_source N/A N/A join code_source N/A exe N/A N/A dist get_executables normalise False N/A N/A N/A N/A exe include_in_bootstrap_env N/A N/A N/A bsexe N/A N/A dist compile_to_bootstrap_exe exe code_source N/A N/A N/A sys platform win32 N/A N/A fexe N/A N/A N/A os path join N/A dist freeze_dir N/A exe name N/A N/A N/A winres copy_safe_resources fexe bsexe N/A N/A N/A N/A sys platform win32 N/A N/A N/A N/A code_source append _CUSTOM_WIN32_CHAINLOADER N/A N/A N/A code_source append N/A N/A dist get_bootstrap_code N/A N/A N/A code_source append bootstrap() N/A code_source N/A N/A join code_source N/A maincode N/A compile_to_bytecode code_source N/A INITNAME .py N/A eskycode N/A compile_to_bytecode esky/__init__.py N/A eskybscode N/A compile_to_bytecode esky/bootstrap.py N/A N/A fcntl N/A sys builtin_module_names N/A N/A nm N/A N/A os listdir N/A dist freeze_dir N/A N/A N/A N/A nm startswith fcntl N/A N/A N/A N/A dist copy_to_bootstrap_env nm N/A nm N/A N/A os listdir N/A dist freeze_dir N/A N/A N/A is_core_dependency nm N/A N/A N/A N/A dist copy_to_bootstrap_env nm N/A exe N/A N/A dist get_executables normalise False N/A N/A N/A N/A exe include_in_bootstrap_env N/A N/A N/A exepath N/A N/A dist copy_to_bootstrap_env N/A exe name N/A N/A N/A dist detached_bootstrap_library N/A N/A exepath N/A N/A dist copy_to_bootstrap_env N/A exe name N/A bslib N/A N/A zipfile PyZipFile exepath a N/A zipfile ZIP_STORED N/A N/A bslib_path N/A N/A dist copy_to_bootstrap_env library.zip N/A bslib N/A N/A zipfile PyZipFile bslib_path w N/A zipfile ZIP_STORED N/A cdate N/A 2000 1 1 0 0 0 N/A N/A N/A bslib writestr N/A N/A zipfile ZipInfo N/A INITNAME .pyc cdate maincode N/A N/A N/A bslib writestr N/A N/A zipfile ZipInfo esky/__init__.pyc cdate eskycode N/A N/A N/A bslib writestr N/A N/A zipfile ZipInfo esky/bootstrap.pyc cdate eskybscode N/A N/A N/A bslib close N/A _normalise_opt_name N/A N/A nm N/A N/A N/A Normalise option names for cx_Freeze.

    This allows people to specify options named like "opt-name" and have
    them converted to the "optName" format used internally by cx_Freeze.
     N/A bits N/A N/A nm split - N/A i N/A xrange 1 N/A len bits N/A N/A N/A bits N/A i N/A N/A N/A bits N/A i N/A N/A N/A N/A N/A bits N/A i N/A 0 upper N/A N/A bits N/A i N/A 1 N/A N/A N/A join bits N/A N/A N/A N/A N/A sys version_info N/A 0 3 N/A N/A EXEC_STATEMENT exec code in globals() N/A N/A EXEC_STATEMENT exec(code,globals()) N/A _CUSTOM_WIN32_CHAINLOADER N/A 

_orig_chainload = _chainload
def _chainload(target_dir):
  mydir = dirname(sys.executable)
  pydll = "python%%s%%s.dll" %% sys.version_info[:2]
  if not exists(pathjoin(target_dir,pydll)):
      _orig_chainload(target_dir)
  else:
      sys.bootstrap_executable = sys.executable
      sys.executable = pathjoin(target_dir,basename(sys.executable))
      verify(sys.executable)
      sys.prefix = sys.prefix.replace(mydir,target_dir)
      sys.argv[0] = sys.executable
      for i in range(len(sys.path)):
          sys.path[i] = sys.path[i].replace(mydir,target_dir)
      #  If we're in the bootstrap dir, try to chdir into the version dir.
      #  This is sometimes necessary for loading of DLLs by relative path.
      curdir = getcwd()
      if curdir == mydir:
          nt.chdir(target_dir)
      import zipimport
      for init_path in sys.path:
          verify(init_path)
          try:
              importer = zipimport.zipimporter(init_path)
              code = importer.get_code("%s")
          except ImportError:
              pass
          else:
              sys.modules.pop("esky",None)
              sys.modules.pop("esky.bootstrap",None)
              #  Adjust various cxfreeze global vars
              global DIR_NAME, FILE_NAME, EXCLUSIVE_ZIP_FILE_NAME
              global SHARED_ZIP_FILE_NAME, INITSCRIPT_ZIP_FILE_NAME
              # TODO: are these derivations correct?
              FILE_NAME = sys.executable
              DIR_NAME = dirname(sys.executable)
              if FILE_NAME.endswith(".exe"):
                  EXCLUSIVE_ZIP_FILE_NAME = pathjoin(DIR_NAME,basename(FILE_NAME)[:-4]+".zip")
              else:
                  EXCLUSIVE_ZIP_FILE_NAME = pathjoin(DIR_NAME,basename(FILE_NAME)+".zip")
              SHARED_ZIP_FILE_NAME = pathjoin(DIR_NAME,"library.zip")
              INITSCRIPT_ZIP_FILE_NAME = init_path
              try:
                  %s
              except zipimport.ZipImportError:
                  e = sys.exc_info()[1]
                  #  If it can't find the __main__{sys.executable} script,
                  #  the user might be running from a backup exe file.
                  #  Fall back to original chainloader to attempt workaround.
                  if e.message.endswith("__main__'"):
                      _orig_chainload(target_dir)
                  raise
              sys.exit(0)
      else:
          _orig_chainload(target_dir)
 N/A INITNAME EXEC_STATEMENT N/A _CUSTOM_PYPY_CHAINLOADER 

_orig_chainload = _chainload
def _chainload(target_dir):
  mydir = dirname(sys.executable)
  pydll = "python%s%s.dll" % sys.version_info[:2]
  if not exists(pathjoin(target_dir,pydll)):
      _orig_chainload(target_dir)
  else:
      py = libpython(pydll)

      #Py_NoSiteFlag = 1;
      #Py_FrozenFlag = 1;
      #Py_IgnoreEnvironmentFlag = 1;

      py.SetPythonHome("")
      py.Initialize()
      # TODO: can't get this through pypy's type annotator.
      # going to fudge it in python instead :-)
      #py.Sys_SetArgv(list(sys.argv))
      syspath = py.GetProgramFullPath() + ";"
      sysfilenm = basename(py.GetProgramFullPath())
      i = 0
      while i < len(sysfilenm) and sysfilenm[i:] != ".exe":
          i += 1
      sysfilenm = sysfilenm[:i]
      sysdir = dirname(py.GetProgramFullPath())
      syspath += sysdir + "\%s.zip;" % (sysfilenm,)
      syspath += sysdir + "\library.zip;"
      syspath += sysdir
      py.Sys_SetPath(syspath);
      #  Escape any double-quotes in sys.argv, so we can easily
      #  include it in a python-level string.
      new_argvs = []
      for arg in sys.argv:
          new_argvs.append('"' + arg.replace('"','\"') + '"')
      new_argv = "[" + ",".join(new_argvs) + "]"
      py.Run_SimpleString("import sys; sys.argv = %s" % (new_argv,))
      py.Run_SimpleString("import sys; sys.frozen = 'cxfreeze'" % (new_argv,))
      globals = py.Dict_New()
      py.Dict_SetItemString(globals,"__builtins__",py.Eval_GetBuiltins())
      esc_target_dir_chars = []
      for c in target_dir:
          if c == "\\":
              esc_target_dir_chars.append("\\")
          esc_target_dir_chars.append(c)
      esc_target_dir = "".join(esc_target_dir_chars)
      script = _PYPY_CHAINLOADER_SCRIPT % (esc_target_dir,)
      py.Run_String(script,py.file_input,globals)
      py.Finalize()
      sys.exit(0)

