From 8199e0064bdc2f2cb0fdd59547f796391445093d Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Sat, 30 May 2015 10:53:51 +0200 Subject: [PATCH] install-deps.sh: do not store pip cache outside of the tree Signed-off-by: Loic Dachary --- install-deps.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/install-deps.sh b/install-deps.sh index a8954fd99bfd..4df059a2cd04 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -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 /') -- 2.47.3