Commit d94cd12a authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Work around pip bug for concurrent access to cache

parent a978fb78
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -34,6 +34,9 @@ ${PY_EXE} -m venv .env

${PY_EXE} -m ensurepip

# https://github.com/pypa/pip/issues/5345#issuecomment-386443351
export XDG_CACHE_HOME=$HOME/.cache/$CI_RUNNER_ID

# Avoid UnicodeDecodeError: https://github.com/pypa/pip/issues/4825
pip install --upgrade pip

+3 −0
Original line number Diff line number Diff line
@@ -57,6 +57,9 @@ PATH="$MINICONDA_INSTALL_DIR/bin:$PATH" conda env create --quiet --file "$CONDA_

source "$MINICONDA_INSTALL_DIR/bin/activate" testing

# https://github.com/pypa/pip/issues/5345#issuecomment-386443351
export XDG_CACHE_HOME=$HOME/.cache/$CI_RUNNER_ID

if test -f "$REQUIREMENTS_TXT"; then
  conda install --quiet --yes pip
  pip install -r "$REQUIREMENTS_TXT"
+3 −0
Original line number Diff line number Diff line
@@ -75,6 +75,9 @@ export PATH=`pwd`/.env/local/bin:$PATH

PIP="${PY_EXE} $(which pip)"

# https://github.com/pypa/pip/issues/5345#issuecomment-386443351
export XDG_CACHE_HOME=$HOME/.cache/$CI_RUNNER_ID

$PIP install --upgrade pip
$PIP install setuptools

+3 −0
Original line number Diff line number Diff line
@@ -58,6 +58,9 @@ if test "$REQUIREMENTS_TXT" == ""; then
  REQUIREMENTS_TXT="requirements.txt"
fi

# https://github.com/pypa/pip/issues/5345#issuecomment-386443351
export XDG_CACHE_HOME=$HOME/.cache/$CI_RUNNER_ID

if test -f $REQUIREMENTS_TXT; then
  $PY_EXE -m pip install -r $REQUIREMENTS_TXT
fi