From: Vincent Bernat <vincent@bernat.ch>
Date: Thu, 13 Dec 2018 12:08:44 +0100
Subject: Compatibility with pip 18.1

pip has been refactored and `main()` is now hidden inside `_internal`
module. We handle this case while keeping compatibility with older
versions.

Forwarded: not-needed
---
 virtualenv.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/virtualenv.py b/virtualenv.py
index 61fe544..bfd1836 100755
--- a/virtualenv.py
+++ b/virtualenv.py
@@ -880,6 +880,10 @@ def install_wheel(project_names, py_executable, search_dirs=None,
         import os
 
         import pip
+        try:
+            from pip._internal import main as _main
+        except ImportError:
+            from pip import main as _main
 
         #cert_data = pkgutil.get_data("pip._vendor.requests", "cacert.pem")
         cert_data = None
@@ -896,7 +900,7 @@ def install_wheel(project_names, py_executable, search_dirs=None,
                 args += ["--cert", cert_file.name]
             args += sys.argv[1:]
 
-            sys.exit(pip.main(args))
+            sys.exit(_main(args))
         finally:
             if cert_file is not None:
                 os.remove(cert_file.name)
