From f6f9a9ea7867a31abd14f3435e16b73f3bd55eeb Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Tue, 9 Feb 2021 21:46:53 +0100 Subject: [PATCH] Finish fix --- tests/letstest/scripts/test_sdists.sh | 13 +++++++++---- tools/pip_install.py | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/letstest/scripts/test_sdists.sh b/tests/letstest/scripts/test_sdists.sh index 61f27a210..c77d674da 100755 --- a/tests/letstest/scripts/test_sdists.sh +++ b/tests/letstest/scripts/test_sdists.sh @@ -12,16 +12,21 @@ sudo $BOOTSTRAP_SCRIPT # We strip the hashes because the venv creation script includes unhashed # constraints in the commands given to pip and the mix of hashed and unhashed # packages makes pip error out. +python3 tools/strip_hashes.py tools/pipstrap_constraints.txt > constraints.txt python3 tools/strip_hashes.py tools/certbot_constraints.txt > requirements.txt -# We pin cryptography to 3.1.1 specifically for CentOS 7 / RHEL 7 because these systems ship -# only with OpenSSL 1.0.2, and this OpenSSL version support has been dropped on cryptography>=3.2. -# Using this old version of OpenSSL would break the cryptography wheel build. +# We pin cryptography to 3.1.1 and pyOpenSSL to 19.1.0 specifically for CentOS 7 / RHEL 7 +# because these systems ship only with OpenSSL 1.0.2, and this OpenSSL version support has been +# dropped on cryptography>=3.2 and pyOpenSSL>=20.0.0. +# Using this old version of OpenSSL would break the cryptography and pyOpenSSL wheels builds. if [ -f /etc/redhat-release ] && [ "$(. /etc/os-release 2> /dev/null && echo "$VERSION_ID")" -eq 7 ]; then sed -i 's|cryptography==.*|cryptography==3.1.1|g' requirements.txt + sed -i 's|pyOpenSSL==.*|pyOpenSSL==19.1.0|g' requirements.txt fi -CERTBOT_PIP_NO_BINARY=:all: tools/venv.py --requirement requirements.txt +python3 -m venv $VENV_PATH +$VENV_PATH/bin/python3 tools/pipstrap.py +PIP_CONSTRAINT=constraints.txt PIP_NO_BINARY=:all: $VENV_PATH/bin/python3 -m pip install --requirement requirements.txt . "$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 diff --git a/tools/pip_install.py b/tools/pip_install.py index 6b08a48b5..e06650ff2 100755 --- a/tools/pip_install.py +++ b/tools/pip_install.py @@ -133,6 +133,7 @@ def main(args): pip_install_with_print('--force-reinstall --no-deps --requirement "{0}"' .format(requirements)) + print(' '.join(args)) pip_install_with_print(' '.join(args), env=env)