summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorBrian McCarthy <brian.mccarthy@mongodb.com>2019-08-29 15:30:42 +0000
committerevergreen <evergreen@mongodb.com>2019-08-29 15:30:42 +0000
commit90a2f703465d3ed007111da228fa2aabe198eebd (patch)
treee80a063eae16a34981968d3204fd4b1ee3e1bed5 /etc
parent2da6db231cf99de7eee335d5009420eef9830a45 (diff)
downloadmongo-90a2f703465d3ed007111da228fa2aabe198eebd.tar.gz
SERVER-43046 Use toolchain python binary to create virtual environments
(cherry picked from commit b2741ca014cc55f59c398d1006ccae06f394018c)
Diffstat (limited to 'etc')
-rw-r--r--etc/evergreen.yml9
1 files changed, 6 insertions, 3 deletions
diff --git a/etc/evergreen.yml b/etc/evergreen.yml
index d6fea62010e..11f90f1e5e6 100644
--- a/etc/evergreen.yml
+++ b/etc/evergreen.yml
@@ -1232,13 +1232,16 @@ functions:
if command -V cygpath; then
# Sad note: We have to use the Windows path instead of the posix path here.
# Otherwise, virtualenv may mistakenly resolve paths relative to c:\cygdrive.
+ # Creating a virtualenv in cygwin with 'python -m venv', will not work correctly
+ # since the paths will be wrong. We need to use virtualenv and specify the
+ # python path as 'C:\python\python_version'
python_loc=$(cygpath -w $python_loc)
venv_dir="$(cygpath -w "$venv_dir")"
+ "$virtualenv_loc" --python "$python_loc" --system-site-packages "$venv_dir"
+ else
+ "$python_loc" -m venv --system-site-packages "$venv_dir"
fi
- # Set up virtualenvs in ${workdir}
- "$virtualenv_loc" --python "$python_loc" --system-site-packages "$venv_dir"
-
export VIRTUAL_ENV_DISABLE_PROMPT=yes
# Not all git get project calls clone into ${workdir}/src so we allow