f8e87cb6cc
Current default path for virtual environment in tools/with_venv.sh is .venv, but official documentation uses tox, and actual path for those following it will be .tox/pyXY. This patch tries to find appropriate tox environment. Change-Id: I78d8cbdf7cc31ccc27f3ef5c3c8cc0630b1b2eff
9 lines
304 B
Bash
Executable File
9 lines
304 B
Bash
Executable File
#!/bin/bash
|
|
tools_path=${tools_path:-$(dirname $0)}
|
|
venv_path=${venv_path:-${tools_path}}
|
|
tox_env=$(cd ${venv_path} && find ../.tox -maxdepth 1 -name "py*" | sort | tail -n1)
|
|
venv_dir=${venv_name:-${tox_env}}
|
|
TOOLS=${tools_path}
|
|
VENV=${venv:-${venv_path}/${venv_dir}}
|
|
source ${VENV}/bin/activate && "$@"
|