github.phpd.cn/thought-machine/please@v12.2.0+incompatible/tools/please_pex/pex_run.py (about)

     1  def run():
     2      if MODULE_DIR:
     3          override_import(MODULE_DIR)
     4      clean_sys_path()
     5      if not ZIP_SAFE:
     6          with explode_zip()():
     7              return interact(main)
     8      else:
     9          sys.meta_path.append(SoImport())
    10          return interact(main)
    11  
    12  
    13  if __name__ == '__main__':
    14      if 'PEX_PROFILE_FILENAME' in os.environ:
    15          with profile(os.environ['PEX_PROFILE_FILENAME'])():
    16              result = run()
    17      else:
    18          result = run()
    19      sys.exit(result)