Skip to content

Commit cbfceb0

Browse files
committed
fix(ci): use Python 3.10 instead of Python 3.9 on Windows
On Windows, the CI images recently removed Python 3.9 without us being notified. This should fix the CI failures we have been seeing as a consequence.
1 parent 8edee15 commit cbfceb0

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.evergreen/compile-artifact.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,18 @@ if uname -p | sed -e 's/s390/matches/' -e 's/ppc/matches/' | grep -q matches; th
3333
python --version
3434
fi
3535

36+
if [ "$OS" == "Windows_NT" ]; then
37+
# Windows machines only have Python 3.10 and 2.7, since Python 3.9
38+
# was removed from them. Python 3.10 support may or may not be
39+
# backported to Node.js 14: https://github.com/nodejs/node/pull/40296/
40+
# For now, let's use Python 2.7.
41+
export PATH="/cygdrive/c/Python27/Scripts:/cygdrive/c/Python27:$PATH"
42+
export FORCE_PYTHON2=1
43+
44+
echo "Using python version:"
45+
python --version
46+
fi
47+
3648
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
3749
npm run evergreen-release compile
3850
dist/mongosh --version

.evergreen/setup-env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
set -e
22
set -x
33
export BASEDIR="$PWD/.evergreen"
4-
export PATH="$BASEDIR/mingit/cmd:$BASEDIR/mingit/mingw64/libexec/git-core:$BASEDIR/git-2:$BASEDIR/node-v$NODE_JS_VERSION-win-x64:/opt/python/3.6/bin:/opt/chefdk/gitbin:/cygdrive/c/Python39/Scripts:/cygdrive/c/Python39:/cygdrive/c/cmake/bin:/opt/mongodbtoolchain/v3/bin:$PATH"
4+
export PATH="$BASEDIR/mingit/cmd:$BASEDIR/mingit/mingw64/libexec/git-core:$BASEDIR/git-2:$BASEDIR/node-v$NODE_JS_VERSION-win-x64:/opt/python/3.6/bin:/opt/chefdk/gitbin:/cygdrive/c/Python310/Scripts:/cygdrive/c/Python310:/cygdrive/c/cmake/bin:/opt/mongodbtoolchain/v3/bin:$PATH"
55
export IS_MONGOSH_EVERGREEN_CI=1
66

77
if [ "$OS" != "Windows_NT" ]; then

0 commit comments

Comments
 (0)