_uninstall.py 780 Bytes
Newer Older
1 2 3 4 5 6
"""Basic pip uninstallation support, helper for the Windows uninstaller"""

import argparse
import ensurepip


7
def _main(argv=None):
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
    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."),
    )

24
    args = parser.parse_args(argv)
25

26
    ensurepip._uninstall_helper(verbosity=args.verbosity)
27 28 29


if __name__ == "__main__":
30
    _main()