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