From bb1fce0bea0d1dd88762b38ddcf68722e6ba9e7c Mon Sep 17 00:00:00 2001 From: Sylvain Herlédan Date: Mon, 17 Sep 2018 21:30:43 +0200 Subject: Put pip cache inside the virtual environment regardless of the install method. --- python_install.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'python_install.sh') diff --git a/python_install.sh b/python_install.sh index b80ff76..3abcf55 100755 --- a/python_install.sh +++ b/python_install.sh @@ -106,6 +106,11 @@ install_environment() exit 1 fi + mkdir -p "${env_dir}/cache" + cat > "${env_dir}/pip.conf" << EOF +[global] +cache-dir=${env_dir}/cache +EOF } install_virtualenv() @@ -126,17 +131,11 @@ install_virtualenv() --no-binary virtualenv \ virtualenv - mkdir -p "${env_dir}/cache" PIP_CACHE_DIR="${env_dir}/cache" \ PIP_IGNORE_INSTALLED=true \ PYTHONPATH="${pkg_dir}" \ "${python}" -m virtualenv "${env_dir}" - - cat > "${env_dir}/pip.conf" << EOF -[global] -cache-dir=${env_dir}/cache -EOF } main() -- cgit v1.2.3-70-g09d2