Browse code

Backport install_pip.sh from master

There are several improvements to install_pip.sh in master. All of these
have to do with the general state of pip upstream and are not something
that have anything to do with icehouse. For sanity, just backport the
entire file.

Change-Id: I9996bbc76ea81dd5bdded3bc8a5bf0542ade95f1
Closes-Bug: 1405579
Closes-bug: #1405626
Related-bug: #1405732

Monty Taylor authored on 2014/12/27 01:05:56
Showing 1 changed files
... ...
@@ -46,7 +46,7 @@ function install_get_pip {
46 46
         curl -o $LOCAL_PIP $PIP_GET_PIP_URL || \
47 47
             die $LINENO "Download of get-pip.py failed"
48 48
     fi
49
-    sudo -E python $LOCAL_PIP
49
+    sudo -H -E python $LOCAL_PIP
50 50
 }
51 51
 
52 52
 
... ...
@@ -68,6 +68,13 @@ function configure_pypi_alternative_url {
68 68
 
69 69
 }
70 70
 
71
+# Setuptools 8 implements PEP 440, and 8.0.4 adds a warning triggered any time
72
+# pkg_resources inspects the list of installed Python packages if there are
73
+# non-compliant version numbers in the egg-info (for example, from distro
74
+# system packaged Python libraries). This is off by default after 8.2 but can
75
+# be enabled by uncommenting the lines below.
76
+#PYTHONWARNINGS=$PYTHONWARNINGS,always::RuntimeWarning:pkg_resources
77
+#export PYTHONWARNINGS
71 78
 
72 79
 # Show starting versions
73 80
 get_versions
... ...
@@ -83,6 +90,6 @@ if [[ -n $PYPI_ALTERNATIVE_URL ]]; then
83 83
     configure_pypi_alternative_url
84 84
 fi
85 85
 
86
-pip_install -U "setuptools<8.0"
86
+pip_install -U setuptools
87 87
 
88 88
 get_versions