take venv3.py call out of bootstrap in all scripts

This commit is contained in:
Erica Portnoy 2020-08-12 18:59:37 -07:00
parent ffdc6be514
commit 25cb2780cc
2 changed files with 17 additions and 2 deletions

View file

@ -6,7 +6,15 @@ BOOTSTRAP_SCRIPT="tests/letstest/scripts/bootstrap_os_packages.sh"
VENV_PATH=venv3
# bootstrap and setup venv
sudo $BOOTSTRAP_SCRIPT . "CERTBOT_PIP_NO_BINARY=:all: $VENV_SCRIPT --requirement letsencrypt-auto-source/pieces/dependency-requirements.txt"
sudo $BOOTSTRAP_SCRIPT
CERTBOT_PIP_NO_BINARY=:all: tools/venv3.py --requirement letsencrypt-auto-source/pieces/dependency-requirements.txt
if command -v python && [ $(python -V 2>&1 | cut -d" " -f 2 | cut -d. -f1,2 | sed 's/\.//') -eq 26 ]; then
# RHEL/CentOS 6 will need a special treatment, so we need to detect that environment
# Enable the SCL Python 3.6 installed by letsencrypt-auto bootstrap
PATH="/opt/rh/rh-python36/root/usr/bin:$PATH"
fi
. "$VENV_PATH/bin/activate"
# pytest is needed to run tests on some of our packages so we install a pinned version here.
tools/pip_install.py pytest

View file

@ -13,9 +13,16 @@ VENV_NAME=venv3
BOOTSTRAP_SCRIPT="$REPO_ROOT/tests/letstest/scripts/bootstrap_os_packages.sh"
VENV_SCRIPT="tools/venv3.py"
sudo $BOOTSTRAP_SCRIPT $REPO_ROOT $VENV_SCRIPT
sudo $BOOTSTRAP_SCRIPT
if command -v python && [ $(python -V 2>&1 | cut -d" " -f 2 | cut -d. -f1,2 | sed 's/\.//') -eq 26 ]; then
# RHEL/CentOS 6 will need a special treatment, so we need to detect that environment
# Enable the SCL Python 3.6 installed by letsencrypt-auto bootstrap
PATH="/opt/rh/rh-python36/root/usr/bin:$PATH"
fi
cd $REPO_ROOT
$VENV_SCRIPT
. $VENV_NAME/bin/activate
"$PIP_INSTALL" pytest