Skip to content

Commit 84f252e

Browse files
authored
fix(NODE-5172): direct link to python 3.9 for prebuild (#609)
1 parent c90645a commit 84f252e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.evergreen/prebuild.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ run_prebuild() {
5252
VERSION_AT_HEAD=$(get_version_at_git_rev "HEAD")
5353
VERSION_AT_HEAD_1=$(get_version_at_git_rev "HEAD~1")
5454

55+
if [[ "$OS" == "macos" ]]; then
56+
ARCH=$(uname -m)
57+
if [[ "$ARCH" == "arm64" ]]; then
58+
# TODO(NODE-5174): node-gyp fails to run prebuild if Python 3.11+
59+
echo "Exporting PYTHON location for version $(/opt/homebrew/opt/[email protected]/bin/python3.9 --version)"
60+
export PYTHON="/opt/homebrew/opt/[email protected]/bin/python3.9"
61+
fi
62+
fi
63+
5564
if [[ -n $NODE_FORCE_PUBLISH ]]; then
5665
echo "\$NODE_FORCE_PUBLISH=${NODE_FORCE_PUBLISH} detected"
5766
echo "Beginning prebuild"

0 commit comments

Comments
 (0)