my eye

Update pip main() interface

Committed 5ae865

--- a/gmpg/_pkg/install.py
+++ b/gmpg/_pkg/install.py

 import os
 import shlex
 
+import pip
 import pkg_resources
 
 from . import listing
 
-# XXX import pip.__main__
-
-
 __all__ = ["add", "remove", "get_orphans"]
 
 
     if editable:
         args.append("-e")
     for dist in distributions:
-        pipmain(*args, str(dist))
+        pip.main(args + [str(dist)])
         # TODO "--no-index -f", CHEESESHOP,
         # TODO "-i https://pypi.python.org/simple/",
     write_log("installed", distributions)
     """
     for distribution in distributions:
         for dist in get_orphans(distribution):
-            pipmain("uninstall", "-y", dist.project_name)
+            pip.main(["uninstall", "-y", dist.project_name])
     write_log("remove", distributions)
 
 
-def pipmain(*args):
-    """"""
-    status = pip.__main__._main(shlex.split(" ".join(args)))
-    # XXX pip.logger.consumers = []  # reset accumulated loggers after each run
-    return status
-
-
 def write_log(action, distributions):
     """"""
     # TODO timestamp & sign w/ GPG