Add sdist check to pep8 build script

Inability to create an sdist tarball is a fundamental problem, but
because of how we run tox in unittest builders, we often do not catch
this anymore. The potential harm is that a change can land to a project
that breaks the ability to create an sdist or run a direct setup.py
install or pip install . - which will in turn break the requirements
gate which tries to do those things.

Change-Id: Ibc36edb06cf072b9f0cf664fae3c3c2273ff71e6
This commit is contained in:
Monty Taylor 2015-12-04 14:54:04 -05:00
parent d99c33e0bc
commit 1c458d51bb

View File

@ -18,6 +18,9 @@ venv=${1:-pep8}
export UPPER_CONSTRAINTS_FILE=$(pwd)/upper-constraints.txt
python setup.py sdist
sdistrc=$?
tox -v -e$venv
rc=$?
@ -28,4 +31,12 @@ echo "======================================================================"
.tox/${venv}/bin/${freezecmd} freeze
echo "======================================================================"
if [ ! $sdistrc ] ; then
echo "******************************************************************"
echo "Project cannot create sdist tarball!!!"
echo "To reproduce this locally, run: 'python setup.py sdist'"
echo "******************************************************************"
exit $sdistrc
fi
exit $rc