From f4f795bda67897b1b1e527e99e0b5f627ca1a4db Mon Sep 17 00:00:00 2001 From: Aric Gardner Date: Mon, 31 Aug 2020 13:39:04 -0400 Subject: [PATCH] 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 --- shell/pypi-dist-build.sh | 11 +++++------ shell/pypi-upload.sh | 12 ++++++------ 2 files changed, 11 insertions(+), 12 deletions(-) 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" -- 2.16.6