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

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