"$lf_venv/bin/pip" install --upgrade --quiet pip virtualenv || return 1
if [[ -z $pkg_list ]]; then
echo "${FUNCNAME[0]}(): WARNING: No packages to install"
- return 0
+ else
+ echo "${FUNCNAME[0]}(): INFO: Installing: $pkg_list"
+ # $pkg_list is expected to be unquoted
+ # shellcheck disable=SC2086
+ "$lf_venv/bin/pip" install --upgrade --quiet --upgrade-strategy eager \
+ $pkg_list || return 1
fi
- echo "${FUNCNAME[0]}(): INFO: Installing: $pkg_list"
- # $pkg_list is expected to be unquoted
- # shellcheck disable=SC2086
- "$lf_venv/bin/pip" install --upgrade --quiet --upgrade-strategy eager \
- $pkg_list || return 1
;;
*)
lf-echo-stderr "${FUNCNAME[0]}(): ERROR: No support for: $python"
--- /dev/null
+---
+prelude: >
+ PyPI verify jobs requires Python 3.x. The tox run picks up default version
+ of python instead of the version made available through pyenv.
+issues:
+ - |
+ Re-factor lf-activate-venv() to skip a return, while the venv is
+ re-used, so that the PATH can be set.
+fixes:
+ - |
+ Update the tox install and run script to Call lf-avtivate-venv().
# Use -x to show value of $PYTHON in output
set -eux -o pipefail
-python3 -m pip install --user --quiet --upgrade tox tox-pyenv virtualenv
+# shellcheck disable=SC1090
+source ~/lf-env.sh
+
+lf-activate-venv --python python3.8 --venv-file /tmp/.toxenv tox tox-pyenv virtualenv
# installs are silent, show version details in log
$PYTHON --version
mkdir -p "$ARCHIVE_TOX_DIR"
cd "$WORKSPACE/$TOX_DIR" || exit 1
+# shellcheck disable=SC1090
+source ~/lf-env.sh
+
+lf-activate-venv --python python3.8 --venv-file /tmp/.toxenv tox tox-pyenv virtualenv
+
if [[ -d /opt/pyenv ]]; then
echo "---> Setting up pyenv"
export PYENV_ROOT="/opt/pyenv"