]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
install-deps.sh: do not store pip cache outside of the tree 4799/head
authorLoic Dachary <ldachary@redhat.com>
Sat, 30 May 2015 08:53:51 +0000 (10:53 +0200)
committerLoic Dachary <ldachary@redhat.com>
Sat, 30 May 2015 09:00:56 +0000 (11:00 +0200)
Signed-off-by: Loic Dachary <ldachary@redhat.org>
install-deps.sh

index a8954fd99bfda568d09947000993e97225b2907e..4df059a2cd041d7fe48f01f0279605f0951bef1e 100755 (executable)
@@ -94,6 +94,13 @@ function get_pip_and_wheel() {
     pip --timeout 300 $install 'setuptools >= 0.8' 'pip >= 7.0' 'wheel >= 0.24' || return 1
 }
 
+# use pip cache if possible but do not store it outside of the source
+# tree
+# see https://pip.pypa.io/en/stable/reference/pip_install.html#caching
+mkdir -p install-deps-cache
+top_srcdir=$(pwd)
+export XDG_CACHE_HOME=$top_srcdir/install-deps-cache
+
 #
 # preload python modules so that tox can run without network access
 #
@@ -107,7 +114,6 @@ for interpreter in python2.7 python3 ; do
 done
 
 find . -name tox.ini | while read ini ; do
-    top_srcdir=$(pwd)
     (
         cd $(dirname $ini)
         require=$(ls *requirements.txt 2>/dev/null | sed -e 's/^/-r /')