Skip to content

Commit c71dbb7

Browse files
authored
fix(ci): update Python version for Windows CI (#1453)
This broke today because the build hosts were updated to a more recent Python version.
1 parent bb87fc8 commit c71dbb7

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.evergreen/setup-env.sh

+8-5
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/npm-8/node_modules/.bin:$BASEDIR/node-v$NODE_JS_VERSION-win-x64:/opt/python/3.6/bin:/opt/java/jdk16/bin:/opt/chefdk/gitbin:/cygdrive/c/python/Python310/Scripts:/cygdrive/c/python/Python310:/cygdrive/c/Python310/Scripts:/cygdrive/c/Python310:/cygdrive/c/cmake/bin:/opt/mongodbtoolchain/v3/bin:$PATH"
4+
export PATH="/cygdrive/c/python/Python311/Scripts:/cygdrive/c/python/Python311:/cygdrive/c/Python311/Scripts:/cygdrive/c/Python311:/opt/python/3.6/bin:$BASEDIR/mingit/cmd:$BASEDIR/mingit/mingw64/libexec/git-core:$BASEDIR/git-2:$BASEDIR/npm-8/node_modules/.bin:$BASEDIR/node-v$NODE_JS_VERSION-win-x64:/opt/java/jdk16/bin:/opt/chefdk/gitbin:/cygdrive/c/cmake/bin:/opt/mongodbtoolchain/v3/bin:$PATH"
55
export IS_MONGOSH_EVERGREEN_CI=1
66

77
if [ "$OS" != "Windows_NT" ]; then
@@ -66,16 +66,19 @@ echo "Full path:"
6666
echo $PATH
6767

6868
echo "Using node version:"
69-
node --version
69+
(which node && node --version)
7070

7171
echo "Using npm version:"
72-
npm --version
72+
(which npm && npm --version)
7373

7474
echo "Using git version:"
75-
git --version
75+
(which git && git --version)
7676

7777
echo "Using python version:"
78-
python --version
78+
(which python && python --version) || true
79+
80+
echo "Using python3 version:"
81+
(which python3 && python3 --version) || true
7982

8083
echo "Node.js OS info:"
8184
node -p '[os.arch(), os.platform(), os.endianness(), os.type(), os.release()]'

testing/integration-testing-hooks.ts

+3
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ async function tryExtensions(base: string): Promise<[ string, Error ]> {
5656

5757
async function findPython3() {
5858
try {
59+
if (process.env.DISTRO_ID?.startsWith('windows-')) {
60+
throw new Error('python3 on Windows in evergreen CI is broken but `python` is working python3');
61+
}
5962
await which('python3');
6063
return 'python3';
6164
} catch {

0 commit comments

Comments
 (0)