Allow user to override pip cache location

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>
This commit is contained in:
Doug Hellmann
2012-07-13 11:11:50 -04:00
parent efb80509f3
commit 4d5e29d906

View File

@@ -387,7 +387,7 @@ function pip_install {
else
CMD_PIP=/usr/bin/pip-python
fi
sudo PIP_DOWNLOAD_CACHE=/var/cache/pip \
sudo PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-/var/cache/pip} \
HTTP_PROXY=$http_proxy \
HTTPS_PROXY=$https_proxy \
$CMD_PIP install --use-mirrors $@