Blame SOURCES/pip-allow-different-versions.patch

04eeea
--- /usr/bin/pip3	2019-11-12 17:37:34.793131862 +0100
04eeea
+++ pip3	2019-11-12 17:40:42.014107134 +0100
04eeea
@@ -2,7 +2,23 @@
04eeea
 # -*- coding: utf-8 -*-
04eeea
 import re
04eeea
 import sys
04eeea
-from pip._internal.cli.main import main
04eeea
+
04eeea
+try:
04eeea
+    from pip._internal.cli.main import main
04eeea
+except ImportError:
04eeea
+    try:
04eeea
+        from pip._internal.main import main
04eeea
+    except ImportError:
04eeea
+        try:
04eeea
+            # If the user has downgraded pip, the above import will fail.
04eeea
+            # Let's try older methods of invoking it:
04eeea
+
04eeea
+            # pip 19 uses this
04eeea
+            from pip._internal import main
04eeea
+        except ImportError:
04eeea
+            # older pip versions use this
04eeea
+            from pip import main
04eeea
+
04eeea
 if __name__ == '__main__':
04eeea
     sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
04eeea
     sys.exit(main())