jpayne@68: """Basic pip uninstallation support, helper for the Windows uninstaller""" jpayne@68: jpayne@68: import argparse jpayne@68: import ensurepip jpayne@68: import sys jpayne@68: jpayne@68: jpayne@68: def _main(argv=None): jpayne@68: parser = argparse.ArgumentParser(prog="python -m ensurepip._uninstall") jpayne@68: parser.add_argument( jpayne@68: "--version", jpayne@68: action="version", jpayne@68: version="pip {}".format(ensurepip.version()), jpayne@68: help="Show the version of pip this will attempt to uninstall.", jpayne@68: ) jpayne@68: parser.add_argument( jpayne@68: "-v", "--verbose", jpayne@68: action="count", jpayne@68: default=0, jpayne@68: dest="verbosity", jpayne@68: help=("Give more output. Option is additive, and can be used up to 3 " jpayne@68: "times."), jpayne@68: ) jpayne@68: jpayne@68: args = parser.parse_args(argv) jpayne@68: jpayne@68: return ensurepip._uninstall_helper(verbosity=args.verbosity) jpayne@68: jpayne@68: jpayne@68: if __name__ == "__main__": jpayne@68: sys.exit(_main())