Fix: Address various shellcheck linting errors in scripts
[releng/global-jjb.git] / shell / pypi-dist-build.sh
index 8baeac1..b2be4af 100644 (file)
@@ -16,13 +16,15 @@ echo "---> pypi-dist-build.sh"
 # Ensure we fail the job if any steps fail.
 set -eu -o pipefail
 
-virtualenv -p python3 /tmp/pypi
-PATH=/tmp/pypi/bin:$PATH
+# shellcheck disable=SC1090
+source ~/lf-env.sh
+
+# Version controlled by JJB_VERSION
+lf-activate-venv setuptools==65.7.0 urllib3~=1.26.15 twine wheel readline
 
 bdist=""
 if $BUILD_BDIST_WHEEL; then
-    echo "INFO: installing wheel to build binary distribution"
-    pip install -q wheel
+    echo "INFO: adding wheel to build binary distribution"
     bdist="bdist_wheel"
 fi
 
@@ -32,4 +34,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"