From c05d9ff33aae7ac0797c6a7fe462a1aa59629766 Mon Sep 17 00:00:00 2001 From: "Lott, Christopher (cl778h)" Date: Mon, 21 Oct 2019 15:52:46 -0400 Subject: [PATCH] Extend PyPI script to call twine check Extend pypi-dist-build.sh to call twine check, which tests if the distribution's long description will render correctly. Change-Id: I2229266f17bc4d1272219466f8fbf2e2614ca21f Issue-Id: RELENG-2317 Signed-off-by: Lott, Christopher (cl778h) --- releasenotes/notes/add-pypi-twine-check-833955d749779d57.yaml | 5 +++++ shell/pypi-dist-build.sh | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 releasenotes/notes/add-pypi-twine-check-833955d749779d57.yaml diff --git a/releasenotes/notes/add-pypi-twine-check-833955d749779d57.yaml b/releasenotes/notes/add-pypi-twine-check-833955d749779d57.yaml new file mode 100644 index 00000000..8f726753 --- /dev/null +++ b/releasenotes/notes/add-pypi-twine-check-833955d749779d57.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Extend PyPI builder shell script to call twine check, which tests + if the distribution's long description will render correctly. diff --git a/shell/pypi-dist-build.sh b/shell/pypi-dist-build.sh index 8baeac1e..27b4b3df 100644 --- a/shell/pypi-dist-build.sh +++ b/shell/pypi-dist-build.sh @@ -19,6 +19,9 @@ 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" @@ -32,4 +35,7 @@ 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" -- 2.16.6