Merge "Fix: Use lf-activate-venv to reuse venv" v0.82.1
authorEric Ball <eball@linuxfoundation.org>
Mon, 17 Oct 2022 17:53:38 +0000 (17:53 +0000)
committerGerrit Code Review <gerrit@linuxfoundation.org>
Mon, 17 Oct 2022 17:53:38 +0000 (17:53 +0000)
releasenotes/notes/fix-venv-tox-9a480bedd07463ba.yaml [new file with mode: 0644]
shell/rtd-verify.sh

diff --git a/releasenotes/notes/fix-venv-tox-9a480bedd07463ba.yaml b/releasenotes/notes/fix-venv-tox-9a480bedd07463ba.yaml
new file mode 100644 (file)
index 0000000..df8cb01
--- /dev/null
@@ -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.
index e91dd71..7c9091f 100644 (file)
@@ -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