Browse code

Keep old behavior of setuptools for editable installs

In the 25.0.0 release [1] of setuptools during any install
operation the package in not overwritten. If a package is
installed from another requirement via pip and then it is
installed again from git, it is not updated causing
check_libs_from_git to fail.

[1] https://setuptools.readthedocs.io/en/latest/history.html#v25-0-0

Change-Id: Ibaa1d4157816ea649f4452756fbde25951347001
Closes-Bug: #1605998
(cherry picked from commit 88ccd47c88dc39b8d746afae89dea31d46558a68)

Spyros Trigazis authored on 2016/07/25 05:13:57
Showing 1 changed files
... ...
@@ -115,11 +115,15 @@ function pip_install {
115 115
     fi
116 116
 
117 117
     $xtrace
118
+    # adding SETUPTOOLS_SYS_PATH_TECHNIQUE is a workaround to keep
119
+    # the same behaviour of setuptools before version 25.0.0.
120
+    # related issue: https://github.com/pypa/pip/issues/3874
118 121
     $sudo_pip \
119 122
         http_proxy="${http_proxy:-}" \
120 123
         https_proxy="${https_proxy:-}" \
121 124
         no_proxy="${no_proxy:-}" \
122 125
         PIP_FIND_LINKS=$PIP_FIND_LINKS \
126
+        SETUPTOOLS_SYS_PATH_TECHNIQUE=rewrite \
123 127
         $cmd_pip $upgrade \
124 128
         $@
125 129