From: Anil Belur Date: Fri, 14 Oct 2022 23:05:52 +0000 (+1000) Subject: Fix: Use lf-activate-venv to reuse venv X-Git-Tag: v0.82.1^2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?p=releng%2Fglobal-jjb.git;a=commitdiff_plain;h=6e5577633a5a529101e5de6f0c2327c02a429099 Fix: Use lf-activate-venv to reuse venv The venv created for tox is unavailable when the semantics of the script is split across files, therefore ensure venv is created with --venv-file option and set. Issue-ID: RELENG-4485 Change-Id: I18c0d255cc7bd282fca20bb31b02ba41c8a74c85 Signed-off-by: Anil Belur --- diff --git a/releasenotes/notes/fix-venv-tox-9a480bedd07463ba.yaml b/releasenotes/notes/fix-venv-tox-9a480bedd07463ba.yaml new file mode 100644 index 00000000..df8cb01f --- /dev/null +++ b/releasenotes/notes/fix-venv-tox-9a480bedd07463ba.yaml @@ -0,0 +1,9 @@ +--- +issues: + - | + line 48: tox: command not found +fixes: + - | + The venv created for tox is unavailable when the semantics of the + script are split across files, therefore ensure venv is created with + --venv-file option and set. diff --git a/shell/rtd-verify.sh b/shell/rtd-verify.sh index e91dd71c..7c9091f5 100644 --- a/shell/rtd-verify.sh +++ b/shell/rtd-verify.sh @@ -34,12 +34,14 @@ for submod in $(git config -f .gitmodules --get-regexp '^submodule\.(.+)\.url' | done +# shellcheck disable=SC1090 +. ~/lf-env.sh + +lf-activate-venv --python python3.8 --venv-file /tmp/.toxenv tox tox-pyenv virtualenv + # When a new commands are added in lftools, the docs verify job needs to # run the new command which requires installing the lftools dev version if [[ $JOB_NAME == "lf-infra-lftools-rtd-verify-any" ]]; then - # shellcheck disable=SC1090 - source ~/lf-env.sh - lf-activate-venv pip pip install -e . fi