psutil_android.py 866 B

123456789101112131415161718192021222324
  1. """Shims to stop the old updater doing work until relaunch, not Android support."""
  2. from pathlib import Path
  3. from typing import NoReturn
  4. from hermes_cli._old_updater import stop_for_relaunch
  5. # Frozen data for old imports, not a download performed by this module.
  6. PSUTIL_URL = (
  7. "https://files.pythonhosted.org/packages/aa/c6/"
  8. "d1ddf4abb55e93cebc4f2ed8b5d6dbad109ecb8d63748dd2b20ab5e57ebe/"
  9. "psutil-7.2.2.tar.gz"
  10. )
  11. def prepare_patched_psutil_sdist(archive: Path, destination: Path) -> NoReturn:
  12. # Shim to stop the old updater doing work until relaunch. Extract nothing.
  13. stop_for_relaunch()
  14. # Shim to stop the old updater doing work until relaunch. Historical callers
  15. # download PSUTIL_URL BEFORE calling prepare_patched_psutil_sdist, so waiting
  16. # for that call is too late. Stop the import without offering a fake URL.
  17. stop_for_relaunch()