Skip to content

Commit 842432f

Browse files
committed
fix handling of uv_python
1 parent 28b95a0 commit 842432f

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

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

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,20 @@ else
2626
BIN_DIR=.venv/bin
2727
fi
2828

29-
# Ensure there is a python venv.
30-
if [ ! -d $BIN_DIR ]; then
31-
. $ROOT/.evergreen/utils.sh
32-
set -x
29+
# Get the appropriate UV_PYTHON.
30+
. $ROOT/.evergreen/utils.sh
31+
set -x
3332

34-
if [ -z "${PYTHON_BINARY:-}" ]; then
35-
if [ -n "${PYTHON_VERSION:-}" ]; then
36-
PYTHON_BINARY=$(get_python_binary $PYTHON_VERSION)
37-
else
38-
PYTHON_BINARY=$(find_python3)
39-
fi
40-
fi
41-
export UV_PYTHON=${PYTHON_BINARY}
42-
echo "export UV_PYTHON=$UV_PYTHON" >> $HERE/env.sh
43-
echo "Using python $UV_PYTHON"
33+
if [ -z "${PYTHON_BINARY:-}" ]; then
34+
if [ -n "${PYTHON_VERSION:-}" ]; then
35+
PYTHON_BINARY=$(get_python_binary $PYTHON_VERSION)
36+
else
37+
PYTHON_BINARY=$(find_python3)
38+
fi
4439
fi
40+
export UV_PYTHON=${PYTHON_BINARY}
41+
echo "export UV_PYTHON=$UV_PYTHON" >> $HERE/env.sh
42+
echo "Using python $UV_PYTHON"
4543

4644
# Add the default install path to the path if needed.
4745
if [ -z "${PYMONGO_BIN_DIR:-}" ]; then

0 commit comments

Comments
 (0)