Skip to content

Commit 9a123bb

Browse files
authored
PYTHON-5183 Fix C Extension building for Windows spawn hosts (mongodb#2178)
1 parent 8927cfe commit 9a123bb

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.evergreen/scripts/setup-dev-env.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,18 @@ if [ -z "${PYMONGO_BIN_DIR:-}" ]; then
4343
export PATH="$PATH:$HOME/.local/bin"
4444
fi
4545

46+
# Set up venv, making sure c extensions build unless disabled.
47+
if [ -z "${NO_EXT:-}" ]; then
48+
export PYMONGO_C_EXT_MUST_BUILD=1
49+
fi
50+
# Set up visual studio env on Windows spawn hosts.
51+
if [ -f $HOME/.visualStudioEnv.sh ]; then
52+
set +u
53+
SSH_TTY=1 source $HOME/.visualStudioEnv.sh
54+
set -u
55+
fi
4656
uv sync --frozen
47-
uv run --frozen --with pip pip install -e .
57+
4858
echo "Setting up python environment... done."
4959

5060
# Ensure there is a pre-commit hook if there is a git checkout.

0 commit comments

Comments
 (0)