annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/lib/python3.8/ensurepip/_uninstall.py @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
rev   line source
jpayne@69 1 """Basic pip uninstallation support, helper for the Windows uninstaller"""
jpayne@69 2
jpayne@69 3 import argparse
jpayne@69 4 import ensurepip
jpayne@69 5 import sys
jpayne@69 6
jpayne@69 7
jpayne@69 8 def _main(argv=None):
jpayne@69 9 parser = argparse.ArgumentParser(prog="python -m ensurepip._uninstall")
jpayne@69 10 parser.add_argument(
jpayne@69 11 "--version",
jpayne@69 12 action="version",
jpayne@69 13 version="pip {}".format(ensurepip.version()),
jpayne@69 14 help="Show the version of pip this will attempt to uninstall.",
jpayne@69 15 )
jpayne@69 16 parser.add_argument(
jpayne@69 17 "-v", "--verbose",
jpayne@69 18 action="count",
jpayne@69 19 default=0,
jpayne@69 20 dest="verbosity",
jpayne@69 21 help=("Give more output. Option is additive, and can be used up to 3 "
jpayne@69 22 "times."),
jpayne@69 23 )
jpayne@69 24
jpayne@69 25 args = parser.parse_args(argv)
jpayne@69 26
jpayne@69 27 return ensurepip._uninstall_helper(verbosity=args.verbosity)
jpayne@69 28
jpayne@69 29
jpayne@69 30 if __name__ == "__main__":
jpayne@69 31 sys.exit(_main())