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