_uninstall.py 780 B

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