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