2013-11-30 03:45:09 -04:00
|
|
|
"""Basic pip uninstallation support, helper for the Windows uninstaller"""
|
|
|
|
|
|
|
|
import argparse
|
|
|
|
import ensurepip
|
2017-09-21 07:07:45 -03:00
|
|
|
import sys
|
2013-11-30 03:45:09 -04:00
|
|
|
|
|
|
|
|
2013-12-23 04:20:34 -04:00
|
|
|
def _main(argv=None):
|
2013-11-30 03:45:09 -04:00
|
|
|
parser = argparse.ArgumentParser(prog="python -m ensurepip._uninstall")
|
|
|
|
parser.add_argument(
|
|
|
|
"--version",
|
|
|
|
action="version",
|
|
|
|
version="pip {}".format(ensurepip.version()),
|
|
|
|
help="Show the version of pip this will attempt to uninstall.",
|
|
|
|
)
|
|
|
|
parser.add_argument(
|
|
|
|
"-v", "--verbose",
|
|
|
|
action="count",
|
|
|
|
default=0,
|
|
|
|
dest="verbosity",
|
|
|
|
help=("Give more output. Option is additive, and can be used up to 3 "
|
|
|
|
"times."),
|
|
|
|
)
|
|
|
|
|
2013-12-23 04:20:34 -04:00
|
|
|
args = parser.parse_args(argv)
|
2013-11-30 03:45:09 -04:00
|
|
|
|
2017-09-21 07:07:45 -03:00
|
|
|
return ensurepip._uninstall_helper(verbosity=args.verbosity)
|
2013-11-30 03:45:09 -04:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2017-09-21 07:07:45 -03:00
|
|
|
sys.exit(_main())
|