certbot/tests/letstest/scripts/test_sdists.sh
Brad Warren 944d0e05c8
Use venv over virtualenv in venv3 (#6922)
Fixes #6861.

_venv_common.py is no longer executable. The reason for this is the venv creation logic is now different between Python 2 and Python 3. We could add code that branches on the Python version running the script, but I personally think that's unnecessary.

--setuptools and --no-site-packages is no longer passed to virtualenv either. These flags were made noops in virtualenv 1.10 and 1.7 respectively, but all of CentOS 6, 7, Debian 8+, and Ubuntu 14.04+ have new enough versions of virtualenv where these flags are no longer necessary. They are not even accepted as flags to Python 3's venv module.

Use of VENV_ARGS from test_sdists.sh was also removed because that environment variable hasn't done anything in a while.

I ran test farm tests on test_apache2.sh and test_sdists.sh with these changes and they passed.

* Fixes #6861.

* _venv_common is no longer executable.
2019-04-05 15:01:09 -07:00

35 lines
823 B
Bash
Executable file

#!/bin/sh -xe
cd letsencrypt
./certbot-auto --os-packages-only -n --debug
PLUGINS="certbot-apache certbot-nginx"
TEMP_DIR=$(mktemp -d)
VERSION=$(letsencrypt-auto-source/version.py)
# setup venv
tools/venv.py --requirement letsencrypt-auto-source/pieces/dependency-requirements.txt
. ./venv/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
# build sdists
for pkg_dir in acme . $PLUGINS; do
cd $pkg_dir
python setup.py clean
rm -rf build dist
python setup.py sdist
mv dist/* $TEMP_DIR
cd -
done
# test sdists
cd $TEMP_DIR
for pkg in acme certbot $PLUGINS; do
tar -xvf "$pkg-$VERSION.tar.gz"
cd "$pkg-$VERSION"
python setup.py build
python setup.py test
python setup.py install
cd -
done