Use pipstrap to ensure pip works on older systems (#5216)

* Use pipstrap in tools/_venv_common.sh

* Use _venv_common.sh in test_sdists
This commit is contained in:
Brad Warren 2017-11-03 10:59:56 -07:00 committed by GitHub
parent 68e37b03c8
commit 884fc56a3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View file

@ -7,13 +7,11 @@ PLUGINS="certbot-apache certbot-nginx"
PYTHON=$(command -v python2.7 || command -v python27 || command -v python2 || command -v python)
TEMP_DIR=$(mktemp -d)
VERSION=$(letsencrypt-auto-source/version.py)
export VENV_ARGS="-p $PYTHON"
# setup venv
virtualenv --no-site-packages -p $PYTHON --setuptools venv
tools/_venv_common.sh --requirement letsencrypt-auto-source/pieces/dependency-requirements.txt
. ./venv/bin/activate
pip install -U pip
pip install -U setuptools
pip install --requirement letsencrypt-auto-source/pieces/dependency-requirements.txt
# build sdists
for pkg_dir in acme . $PLUGINS; do

View file

@ -15,10 +15,10 @@ mv $VENV_NAME "$VENV_NAME.$(date +%s).bak" || true
virtualenv --no-site-packages --setuptools $VENV_NAME $VENV_ARGS
. ./$VENV_NAME/bin/activate
# Separately install setuptools and pip to make sure following
# invocations use latest
pip install -U pip
pip install -U setuptools
# Use pipstrap to update Python packaging tools to only update to a well tested
# version and to work around https://github.com/pypa/pip/issues/4817 on older
# systems.
python letsencrypt-auto-source/pieces/pipstrap.py
./tools/pip_install.sh "$@"
set +x