Skip to content

Fix failing pip on ci #223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions scripts/activate-venv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ log() { echo -e "\x1B[92m[OK]\x1B[39m $@"; }

source "$VENV_ROOT/bin/activate"

MODULE_FEATURE="[dev]"
if ! [[ -z "${BUILD_CONTEXT+x}" ]]; then
if [[ "$BUILD_CONTEXT" == "ci" ]]; then
MODULE_FEATURE="[test]" # Will cause testing tools to be installed.
export PIP_CACHE_DIR=$VENV_ROOT/pip_cache # Avoid concurrent cache access issue on CI
echo "PIP_CACHE_DIR=${PIP_CACHE_DIR}"
fi
fi

if ! pip3 show wheel 2>&1 >/dev/null; then
log "Installing wheel..."
pip3 install wheel
Expand All @@ -24,13 +33,6 @@ if ! pip3 show wheel 2>&1 >/dev/null; then
pip3 install --upgrade setuptools
fi

MODULE_FEATURE="[dev]"
if ! [[ -z "${BUILD_CONTEXT+x}" ]]; then
if [[ "$BUILD_CONTEXT" == "ci" ]]; then
MODULE_FEATURE="[test]" # Will cause testing tools to be installed.
fi
fi

if ! diff "$PY_MODULE_ROOT/setup.py" "$VENV_ROOT/cache/setup.py" 2>&1 >/dev/null; then
log "Install inside venv"
pip3 install -e "${PY_MODULE_ROOT}${MODULE_FEATURE}"
Expand Down