blob: 750365ec4d04da980399c94c35668935482b9cce [file] [log] [blame]
Nick Coghlan60f08c82013-11-30 17:45:09 +10001"""Basic pip uninstallation support, helper for the Windows uninstaller"""
2
3import argparse
4import ensurepip
5
6
Nick Coghlanf71cae02013-12-23 18:20:34 +10007def _main(argv=None):
Nick Coghlan60f08c82013-11-30 17:45:09 +10008 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
Nick Coghlanf71cae02013-12-23 18:20:34 +100024 args = parser.parse_args(argv)
Nick Coghlan60f08c82013-11-30 17:45:09 +100025
Nick Coghlanf71cae02013-12-23 18:20:34 +100026 ensurepip._uninstall_helper(verbosity=args.verbosity)
Nick Coghlan60f08c82013-11-30 17:45:09 +100027
28
29if __name__ == "__main__":
Nick Coghlanf71cae02013-12-23 18:20:34 +100030 _main()