Skip to content

Commit f1da74e

Browse files
committed
Replace manual Python selection in compile function
1 parent d219f77 commit f1da74e

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

.mci.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -346,21 +346,14 @@ functions:
346346
fi
347347
export CMAKE=${cmake}
348348
349-
if [ "x$(lsb_release -cs)" = "xtrusty" -a -f /opt/mongodbtoolchain/v2/bin/python ]; then
350-
/opt/mongodbtoolchain/v2/bin/python -m virtualenv venv
351-
elif ! python -m virtualenv venv 2>/dev/null; then
352-
/opt/mongodbtoolchain/v3/bin/python3 -m venv venv
349+
if [ ! -d ../drivers-evergreen-tools ]; then
350+
git clone --depth 1 [email protected]:mongodb-labs/drivers-evergreen-tools.git ../drivers-evergreen-tools
353351
fi
352+
. ../drivers-evergreen-tools/.evergreen/find-python3.sh
353+
. ../drivers-evergreen-tools/.evergreen/venv-utils.sh
354354
355-
cd venv
356-
if [ -f bin/activate ]; then
357-
. bin/activate
358-
./bin/pip install GitPython
359-
elif [ -f Scripts/activate ]; then
360-
. Scripts/activate
361-
./Scripts/pip install GitPython
362-
fi
363-
cd ..
355+
venvcreate "$(find_python3)" venv
356+
python -m pip install GitPython
364357
365358
export GENERATOR="${generator}"
366359

0 commit comments

Comments
 (0)