summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2013-11-30 17:45:09 +1000
committerNick Coghlan <ncoghlan@gmail.com>2013-11-30 17:45:09 +1000
commit735355b2fc898d915cf0c10b335153c57801d46f (patch)
tree8e711bfb2c97241be5ca15a816ce1760e8bfe711 /Lib
parent57a998273b852073433d00b591d41e194e092db4 (diff)
downloadcpython-735355b2fc898d915cf0c10b335153c57801d46f.tar.gz
Issue #19726: actually running 'hg add' helps...
Diffstat (limited to 'Lib')
-rw-r--r--Lib/ensurepip/_uninstall.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/Lib/ensurepip/_uninstall.py b/Lib/ensurepip/_uninstall.py
new file mode 100644
index 0000000000..38c486b0a2
--- /dev/null
+++ b/Lib/ensurepip/_uninstall.py
@@ -0,0 +1,30 @@
+"""Basic pip uninstallation support, helper for the Windows uninstaller"""
+
+import argparse
+import ensurepip
+
+
+def main():
+ 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."),
+ )
+
+ args = parser.parse_args()
+
+ ensurepip._uninstall(verbosity=args.verbosity)
+
+
+if __name__ == "__main__":
+ main()