Use the standard PIP_CACHE_DIR for Python dependency caching template

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
This commit is contained in:
Takuya Noguchi 2018-10-09 14:49:15 +09:00
parent c90d34044a
commit af013d34d9
3 changed files with 8 additions and 3 deletions

View File

@ -0,0 +1,5 @@
---
title: Use the standard PIP_CACHE_DIR for Python dependency caching template
merge_request: 22211
author: Takuya Noguchi
type: fixed

View File

@ -253,7 +253,7 @@ image: python:latest
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache"
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/reference/pip_install/#caching
@ -262,7 +262,7 @@ variables:
# them in a virtualenv and cache it as well.
cache:
paths:
- .cache/
- .cache/pip
- venv/
before_script:

View File

@ -5,7 +5,7 @@ image: python:latest
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache"
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/reference/pip_install/#caching