[MediaWiki-commits] [Gerrit] search...deploy[master]: Dont recreate virtualenv unless necessary
EBernhardson has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/391296 ) Change subject: Dont recreate virtualenv unless necessary .. Dont recreate virtualenv unless necessary It appears that while the first run of the virtualenv.sh script will succeed on a debian jessie based system, future runs will attempt to overwrite the upgraded pip with the older system version of pip. This causes pip to completly break with a mismatch between versions. Change-Id: I7c6fd8ea1e1ee35a3e7386fd9b628c0605a11fda --- M scap/checks/virtualenv.sh 1 file changed, 7 insertions(+), 3 deletions(-) Approvals: EBernhardson: Verified; Looks good to me, approved diff --git a/scap/checks/virtualenv.sh b/scap/checks/virtualenv.sh index 2f8ebba..56da498 100644 --- a/scap/checks/virtualenv.sh +++ b/scap/checks/virtualenv.sh @@ -13,9 +13,13 @@ PIP="${VENV}/bin/pip" -# Ensure that the virtual environment exists -mkdir -p "$VENV" -virtualenv --never-download --python python2.7 $VENV || /bin/true +# Ensure that the virtual environment exists. Don't recreate if already +# existing, as this will try and downgrade pip on debian jessie from the one +# installed later which then breaks pip. +if [ ! -x "$PIP" ]; then +mkdir -p "$VENV" +virtualenv --never-download --python python2.7 $VENV || /bin/true +fi # Debian jessie based hosts need updated versions of pip and wheel or they will # fail to install some binary packages (numpy, scipy, maybe others) -- To view, visit https://gerrit.wikimedia.org/r/391296 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7c6fd8ea1e1ee35a3e7386fd9b628c0605a11fda Gerrit-PatchSet: 1 Gerrit-Project: search/MjoLniR/deploy Gerrit-Branch: master Gerrit-Owner: EBernhardson Gerrit-Reviewer: EBernhardson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] search...deploy[master]: Dont recreate virtualenv unless necessary
EBernhardson has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/391296 ) Change subject: Dont recreate virtualenv unless necessary .. Dont recreate virtualenv unless necessary It appears that while the first run of the virtualenv.sh script will succeed on a debian jessie based system, future runs will attempt to overwrite the upgraded pip with the older system version of pip. This causes pip to completly break with a mismatch between versions. Change-Id: I7c6fd8ea1e1ee35a3e7386fd9b628c0605a11fda --- M scap/checks/virtualenv.sh 1 file changed, 7 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/search/MjoLniR/deploy refs/changes/96/391296/1 diff --git a/scap/checks/virtualenv.sh b/scap/checks/virtualenv.sh index 2f8ebba..56da498 100644 --- a/scap/checks/virtualenv.sh +++ b/scap/checks/virtualenv.sh @@ -13,9 +13,13 @@ PIP="${VENV}/bin/pip" -# Ensure that the virtual environment exists -mkdir -p "$VENV" -virtualenv --never-download --python python2.7 $VENV || /bin/true +# Ensure that the virtual environment exists. Don't recreate if already +# existing, as this will try and downgrade pip on debian jessie from the one +# installed later which then breaks pip. +if [ ! -x "$PIP" ]; then +mkdir -p "$VENV" +virtualenv --never-download --python python2.7 $VENV || /bin/true +fi # Debian jessie based hosts need updated versions of pip and wheel or they will # fail to install some binary packages (numpy, scipy, maybe others) -- To view, visit https://gerrit.wikimedia.org/r/391296 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7c6fd8ea1e1ee35a3e7386fd9b628c0605a11fda Gerrit-PatchSet: 1 Gerrit-Project: search/MjoLniR/deploy Gerrit-Branch: master Gerrit-Owner: EBernhardson ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits