Fix pypi build and upload. 39/65239/1
authorAric Gardner <agardner@linuxfoundation.org>
Mon, 31 Aug 2020 17:39:04 +0000 (13:39 -0400)
committerAric Gardner <agardner@linuxfoundation.org>
Mon, 31 Aug 2020 17:44:00 +0000 (13:44 -0400)
No need for job to create its own
venv like this.
virtualenv -p python3 /tmp/pypi

this does not update virtualenv first
also it was failing, I think due to
needing a readline package update.

python3 -m venv is preferred.
however we have lf-env.sh, which does things properly.
se we are going to use it.

Issue-ID: IT-20528
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: If2b8369296256368659c41e9e77231d4442f55bd

shell/pypi-dist-build.sh
shell/pypi-upload.sh

index 9341a1f..4bc0a77 100644 (file)
@@ -16,12 +16,11 @@ echo "---> pypi-dist-build.sh"
 # Ensure we fail the job if any steps fail.
 set -eu -o pipefail
 
-echo "INFO: creating virtual environment"
-virtualenv -p python3 /tmp/pypi
-PATH=/tmp/pypi/bin:$PATH
-pipup="python -m pip install -q --upgrade setuptools twine wheel"
-echo "INFO: $pipup"
-$pipup
+# shellcheck disable=SC1090
+source ~/lf-env.sh
+
+# Version controlled by JJB_VERSION
+lf-activate-venv setuptools twine wheel readline
 
 bdist=""
 if $BUILD_BDIST_WHEEL; then
index 3219cad..fee5766 100644 (file)
@@ -17,12 +17,12 @@ echo "---> pypi-upload.sh"
 # Ensure we fail the job if any steps fail.
 set -eu -o pipefail
 
-echo "INFO: creating virtual environment"
-virtualenv -p python3 /tmp/pypi
-PATH=/tmp/pypi/bin:$PATH
-pipup="python -m pip install -q --upgrade twine"
-echo "INFO: $pipup"
-$pipup
+# shellcheck disable=SC1090
+source ~/lf-env.sh
+
+# Version controlled by JJB_VERSION
+lf-activate-venv setuptools twine wheel readline
+
 
 echo "INFO: cd to tox-dir $TOX_DIR"
 cd "$WORKSPACE/$TOX_DIR"