Extend PyPI script to call twine check
[releng/global-jjb.git] / shell / pypi-dist-build.sh
index eb10371..27b4b3d 100644 (file)
@@ -19,15 +19,23 @@ set -eu -o pipefail
 virtualenv -p python3 /tmp/pypi
 PATH=/tmp/pypi/bin:$PATH
 
+echo "INFO: installing twine to check distributions"
+pip install -q twine
+
 bdist=""
 if $BUILD_BDIST_WHEEL; then
     echo "INFO: installing wheel to build binary distribution"
-    pip install wheel
+    pip install -q wheel
     bdist="bdist_wheel"
 fi
 
 echo "INFO: cd to tox-dir $TOX_DIR"
 cd "$WORKSPACE/$TOX_DIR"
+
 echo "INFO: creating distributions"
 python3 setup.py sdist $bdist
+
+echo "INFO: checking distributions"
+twine check dist/*
+
 echo "---> pypi-dist-build.sh ends"