launch.py 584 B

1234567891011121314151617181920
  1. """CLI entry after the isolated interpreter has been selected."""
  2. from pathlib import Path
  3. import sys
  4. import truststore
  5. sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
  6. def main() -> int:
  7. # PM's import closure constructs HTTPS clients; install platform trust
  8. # before importing it, but never mutate SSL merely by importing launch.
  9. truststore.inject_into_ssl()
  10. from pm.cli import main as cli_main
  11. from pm.runtime import lease_current_runtime
  12. lease_current_runtime()
  13. return cli_main()
  14. if __name__ == "__main__":
  15. raise SystemExit(main())