_uninstall.py 808 B

12345678910111213141516171819202122232425262728293031
  1. """Basic pip uninstallation support, helper for the Windows uninstaller"""
  2. import argparse
  3. import ensurepip
  4. import sys
  5. def _main(argv=None):
  6. parser = argparse.ArgumentParser(prog="python -m ensurepip._uninstall")
  7. parser.add_argument(
  8. "--version",
  9. action="version",
  10. version="pip {}".format(ensurepip.version()),
  11. help="Show the version of pip this will attempt to uninstall.",
  12. )
  13. parser.add_argument(
  14. "-v", "--verbose",
  15. action="count",
  16. default=0,
  17. dest="verbosity",
  18. help=("Give more output. Option is additive, and can be used up to 3 "
  19. "times."),
  20. )
  21. args = parser.parse_args(argv)
  22. return ensurepip._uninstall_helper(verbosity=args.verbosity)
  23. if __name__ == "__main__":
  24. sys.exit(_main())