Fix default path in tools/with_venv.sh
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
This commit is contained in:
parent
13faf8b889
commit
f8e87cb6cc
@ -1,7 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
tools_path=${tools_path:-$(dirname $0)}
|
tools_path=${tools_path:-$(dirname $0)}
|
||||||
venv_path=${venv_path:-${tools_path}}
|
venv_path=${venv_path:-${tools_path}}
|
||||||
venv_dir=${venv_name:-/../.venv}
|
tox_env=$(cd ${venv_path} && find ../.tox -maxdepth 1 -name "py*" | sort | tail -n1)
|
||||||
|
venv_dir=${venv_name:-${tox_env}}
|
||||||
TOOLS=${tools_path}
|
TOOLS=${tools_path}
|
||||||
VENV=${venv:-${venv_path}/${venv_dir}}
|
VENV=${venv:-${venv_path}/${venv_dir}}
|
||||||
source ${VENV}/bin/activate && "$@"
|
source ${VENV}/bin/activate && "$@"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user