Commit 31dcd3e
committed
Use unique build dir for pip installs
There is a bug in pip [1] where it will choose to install a package
from an existing build-dir if it exists over the version actually
requested.
Thus if a prior component has installed a later version of the
package, the unpacked code is already in /tmp/$USER-pip-build; it gets
re-installed and manifests in a confusing error along the lines of
---
Downloading/unpacking requests>=1.1,<1.2.3
(from -r /home/stack//python-cinderclient/requirements.txt (line 5))
Running setup.py egg_info for package requests
Requested requests>=1.1,<1.2.3 (from -r
/home/stack/python-cinderclient/requirements.txt (line 5)),
but installing version 1.2.3
...
error: Installed distribution requests 1.2.3 conflicts with
requirement requests>=1.1,<1.2.3
---
I believe pip 1.4 fixes this problem, but it should always be safe to
specify a unique build-directory for pip installs to avoid picking up
old versions.
We also add a cleanup_tmp function for clearing out anything that
stack.sh might leave around when un-stacking, and add a catch-all for
the pip-build dir.
[1] pypa/pip#709
Change-Id: I7ce919cddfd6d6175ae67bd864f82e256ebc70901 parent 89b5884 commit 31dcd3e
2 files changed
Lines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
913 | 913 | | |
914 | 914 | | |
915 | 915 | | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
916 | 926 | | |
917 | 927 | | |
918 | 928 | | |
919 | 929 | | |
920 | | - | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
921 | 933 | | |
922 | 934 | | |
923 | 935 | | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
924 | 945 | | |
925 | 946 | | |
926 | 947 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
0 commit comments