diff options
author | Mikhail Shchatko <mikhail.shchatko@mongodb.com> | 2021-08-19 11:26:38 +0300 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-08-23 10:37:48 +0000 |
commit | 9fbd37083621ef313636552da0045a2d2a2d8955 (patch) | |
tree | 6e72e9c5a679ecfec905aa15c25d119bbaf3c40e /evergreen/functions | |
parent | 83972b91fc8c84f38217c36735cf0828888a774a (diff) | |
download | mongo-9fbd37083621ef313636552da0045a2d2a2d8955.tar.gz |
SERVER-55129 Archive python venv in archive_dist_test and fetch it
Diffstat (limited to 'evergreen/functions')
-rw-r--r-- | evergreen/functions/venv_setup.sh | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/evergreen/functions/venv_setup.sh b/evergreen/functions/venv_setup.sh index 0669026da3e..79deed10c43 100644 --- a/evergreen/functions/venv_setup.sh +++ b/evergreen/functions/venv_setup.sh @@ -6,17 +6,28 @@ evergreen_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)/.. . "$evergreen_dir/prelude_python.sh" python_loc=$(which ${python}) -venv_dir="${workdir}/venv" +venv_dir="${workdir}/../mongodb-mongo-venv" if [ -d "$venv_dir" ]; then exit 0 fi "$python_loc" -m venv "$venv_dir" +pushd $venv_dir +venv_dir=$(pwd) +popd +cat << EOF >> "$venv_dir/README.txt" +This is an archive of the Python venv generated by this Evergreen build. +You can use it locally to avoid needing to manually set up the Python environment. + +Note that Python venv is not relocatable, you must therefore extract this directory to: +$venv_dir +EOF + # venv creates its Scripts/activate file with CLRF endings, which # cygwin bash does not like. dos2unix it # (See https://bugs.python.org/issue32451) if [ "Windows_NT" = "$OS" ]; then - dos2unix "${workdir}/venv/Scripts/activate" + dos2unix "${workdir}/../mongodb-mongo-venv/Scripts/activate" fi export VIRTUAL_ENV_DISABLE_PROMPT=yes |