From f623f9426b90077f16bdb5e1cd33ba9b8a102ae5 Mon Sep 17 00:00:00 2001 From: Daniel Moody Date: Wed, 9 Jun 2021 09:25:23 -0500 Subject: SERVER-55446 added rosetta and arm64 macos builders to evergreen (cherry picked from commit 02feb4df5a0e4bf9ac915aaafd8842ce9c738d73) --- evergreen/functions/venv_setup.sh | 7 +++++++ evergreen/prelude_python.sh | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'evergreen') diff --git a/evergreen/functions/venv_setup.sh b/evergreen/functions/venv_setup.sh index 128adad9cfd..ec86d7bb539 100644 --- a/evergreen/functions/venv_setup.sh +++ b/evergreen/functions/venv_setup.sh @@ -39,6 +39,13 @@ toolchain_txt="$pip_dir/toolchain-requirements.txt" activate_venv echo "Upgrading pip to 21.0.1" + +# ref: https://github.com/grpc/grpc/issues/25082#issuecomment-778392661 +if [ "$(uname -m)" = "arm64" ] && [ "$(uname)" == "Darwin" ]; then + export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 + export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1 +fi + python -m pip --disable-pip-version-check install "pip==21.0.1" || exit 1 python -m pip --disable-pip-version-check install -r "$toolchain_txt" -q --log install.log if [ $? != 0 ]; then diff --git a/evergreen/prelude_python.sh b/evergreen/prelude_python.sh index d6192c253bc..278492f7947 100644 --- a/evergreen/prelude_python.sh +++ b/evergreen/prelude_python.sh @@ -1,5 +1,13 @@ if [ "Windows_NT" = "$OS" ]; then python='/cygdrive/c/python/python37/python.exe' else - python="/opt/mongodbtoolchain/v3/bin/python3" + if [ -f /opt/mongodbtoolchain/v3/bin/python3 ]; then + python="/opt/mongodbtoolchain/v3/bin/python3" + elif [ -f "$(which python3)" ]; then + echo "Could not find mongodbtoolchain python, using system python $(which python3)" >2 + python=$(which python3) + else + echo "Could not find python3." >2 + return 1 + fi fi -- cgit v1.2.1