File tree Expand file tree Collapse file tree 6 files changed +53
-23
lines changed Expand file tree Collapse file tree 6 files changed +53
-23
lines changed Original file line number Diff line number Diff line change 25
25
exit 1
26
26
fi
27
27
28
+ . $ROOT /.evergreen/utils.sh
29
+ UV=$( get_uv)
30
+
28
31
# List the packages.
29
- uv sync ${UV_ARGS} --reinstall
30
- uv pip list
32
+ $UV sync ${UV_ARGS} --reinstall
33
+ $UV pip list
31
34
32
35
# Ensure we go back to base environment after the test.
33
36
trap " uv sync" EXIT HUP
34
37
35
38
# Start the test runner.
36
- uv run ${UV_ARGS} .evergreen/scripts/run_tests.py " $@ "
39
+ $UV run ${UV_ARGS} .evergreen/scripts/run_tests.py " $@ "
37
40
38
41
popd
Original file line number Diff line number Diff line change @@ -38,6 +38,22 @@ function _pip_install() {
38
38
}
39
39
40
40
41
+ # Try to use the binaries in the toolchain if available.
42
+ if [ -n " ${CI} " ]; then
43
+ export PATH
44
+ case " ${OSTYPE:? } " in
45
+ cygwin)
46
+ PATH=" /cygdrive/c/Python/Current/Scripts:${PATH:- } "
47
+ ;;
48
+ darwin* )
49
+ PATH=" /Library/Frameworks/Python.Framework/Versions/Current/bin:${PATH:- } "
50
+ ;;
51
+ * )
52
+ PATH=" /opt/python/Current/bin:${PATH:- } "
53
+ ;;
54
+ esac
55
+ fi
56
+
41
57
# Ensure just is installed.
42
58
if ! command -v just > /dev/null 2>&1 ; then
43
59
# On most systems we can install directly.
Original file line number Diff line number Diff line change @@ -10,4 +10,7 @@ if [ -f $HERE/env.sh ]; then
10
10
source $HERE /env.sh
11
11
fi
12
12
13
- uv run $HERE /run_server.py " $@ "
13
+ . $ROOT /.evergreen/utils.sh
14
+ UV=$( get_uv)
15
+
16
+ $UV run $HERE /run_server.py " $@ "
Original file line number Diff line number Diff line change @@ -16,22 +16,6 @@ if [ -f $HERE/test-env.sh ]; then
16
16
. $HERE /test-env.sh
17
17
fi
18
18
19
- # Try to use the binaries in the toolchain if available.
20
- if [ -n " ${CI} " ]; then
21
- export PATH
22
- case " ${OSTYPE:? } " in
23
- cygwin)
24
- PATH=" /cygdrive/c/Python/Current:${PATH:- } "
25
- ;;
26
- darwin* )
27
- PATH=" /Library/Frameworks/Python.Framework/Versions/Current/bin:${PATH:- } "
28
- ;;
29
- * )
30
- PATH=" /opt/python/Current/bin:${PATH:- } "
31
- ;;
32
- esac
33
- fi
34
-
35
19
# Ensure dependencies are installed.
36
20
bash $HERE /install-dependencies.sh
37
21
@@ -63,13 +47,15 @@ if [ -f $HOME/.visualStudioEnv.sh ]; then
63
47
SSH_TTY=1 source $HOME /.visualStudioEnv.sh
64
48
set -u
65
49
fi
66
- uv sync --frozen
50
+
51
+ UV=$( get_uv)
52
+ $UV sync --frozen
67
53
68
54
echo " Setting up python environment... done."
69
55
70
56
# Ensure there is a pre-commit hook if there is a git checkout.
71
57
if [ -d .git ] && [ ! -f .git/hooks/pre-commit ]; then
72
- uv run --frozen pre-commit install
58
+ $UV run --frozen pre-commit install
73
59
fi
74
60
75
61
popd > /dev/null
Original file line number Diff line number Diff line change @@ -20,4 +20,7 @@ if [ -f $SCRIPT_DIR/env.sh ]; then
20
20
source $SCRIPT_DIR /env.sh
21
21
fi
22
22
23
- uv run $SCRIPT_DIR /setup_tests.py " $@ "
23
+ . $ROOT /.evergreen/utils.sh
24
+ UV=$( get_uv)
25
+
26
+ $UV run $SCRIPT_DIR /setup_tests.py " $@ "
Original file line number Diff line number Diff line change @@ -138,3 +138,22 @@ get_python_binary() {
138
138
return 1
139
139
fi
140
140
}
141
+
142
+
143
+ # Get the appropriate uv binary.
144
+ get_uv () {
145
+ # Try to use the binaries in the toolchain if available.
146
+ if [ -f " /cygdrive/c/Python/Current/Scripts/uv.exe" ]; then
147
+ echo " /cygdrive/c/Python/Current/Scripts/uv.exe"
148
+ return
149
+ fi
150
+ if [ -f " /Library/Frameworks/Python.Framework/Versions/Current/bin/uv" ]; then
151
+ echo " /Library/Frameworks/Python.Framework/Versions/Current/bin/uv"
152
+ return
153
+ fi
154
+ if [ -f " /opt/python/Current/bin" ]; then
155
+ echo " /opt/python/Current/bin/uv"
156
+ return
157
+ fi
158
+ echo " $( which uv) "
159
+ }
You can’t perform that action at this time.
0 commit comments