Building a VM containing devstack is faster if you can save
the cache files for pip in a location that is not deleted
when the VM is rebuilt. This change allows the user to
set the PIP_DOWNLOAD_CACHE in their localrc file to point
to any directory writable by root, including a directory
mounted from the host containing the VM.
Change-Id: I27179c1c212140d6734f6725f498be52fd18e9ed
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
... | ... |
@@ -387,7 +387,7 @@ function pip_install { |
387 | 387 |
else |
388 | 388 |
CMD_PIP=/usr/bin/pip-python |
389 | 389 |
fi |
390 |
- sudo PIP_DOWNLOAD_CACHE=/var/cache/pip \ |
|
390 |
+ sudo PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-/var/cache/pip} \ |
|
391 | 391 |
HTTP_PROXY=$http_proxy \ |
392 | 392 |
HTTPS_PROXY=$https_proxy \ |
393 | 393 |
$CMD_PIP install --use-mirrors $@ |