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