From: Aric Gardner Date: Mon, 31 Aug 2020 17:39:04 +0000 (-0400) Subject: Fix pypi build and upload. X-Git-Tag: v0.57.1~3 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F39%2F65239%2F1;p=releng%2Fglobal-jjb.git Fix pypi build and upload. 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 Change-Id: If2b8369296256368659c41e9e77231d4442f55bd --- diff --git a/shell/pypi-dist-build.sh b/shell/pypi-dist-build.sh index 9341a1ff..4bc0a776 100644 --- a/shell/pypi-dist-build.sh +++ b/shell/pypi-dist-build.sh @@ -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 diff --git a/shell/pypi-upload.sh b/shell/pypi-upload.sh index 3219cadf..fee5766a 100644 --- a/shell/pypi-upload.sh +++ b/shell/pypi-upload.sh @@ -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"