Skip to content

Commit b2741ca

Browse files
briananthonymccarthyevergreen
authored andcommitted
SERVER-43046 Use toolchain python binary to create virtual environments
1 parent d6f1184 commit b2741ca

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

etc/evergreen.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,13 +1304,16 @@ functions:
13041304
if command -V cygpath; then
13051305
# Sad note: We have to use the Windows path instead of the posix path here.
13061306
# Otherwise, virtualenv may mistakenly resolve paths relative to c:\cygdrive.
1307+
# Creating a virtualenv in cygwin with 'python -m venv', will not work correctly
1308+
# since the paths will be wrong. We need to use virtualenv and specify the
1309+
# python path as 'C:\python\python_version'
13071310
python_loc=$(cygpath -w $python_loc)
13081311
venv_dir="$(cygpath -w "$venv_dir")"
1312+
"$virtualenv_loc" --python "$python_loc" --system-site-packages "$venv_dir"
1313+
else
1314+
"$python_loc" -m venv --system-site-packages "$venv_dir"
13091315
fi
13101316
1311-
# Set up virtualenvs in ${workdir}
1312-
"$virtualenv_loc" --python "$python_loc" --system-site-packages "$venv_dir"
1313-
13141317
export VIRTUAL_ENV_DISABLE_PROMPT=yes
13151318
13161319
# Not all git get project calls clone into ${workdir}/src so we allow

0 commit comments

Comments
 (0)