Skip to content

Commit 9b8a577

Browse files
authored
Manually invoke python3 on windows-64-vs2015 (#1319)
1 parent 43d2074 commit 9b8a577

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

.evergreen/config_generator/components/compile_only.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ def generate_tasks():
7070
commands=[
7171
Setup.call(),
7272
FetchCDriverSource.call(),
73-
InstallUV.call(),
73+
] + (
74+
# DEVPROD-13875 + astral-sh/uv/issues/10231.
75+
[] if "vs2015" in distro_name else [InstallUV.call()]
76+
) + [
7477
Compile.call(
7578
build_type=build_type,
7679
compiler=compiler,

.evergreen/generated_configs/tasks.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ tasks:
238238
commands:
239239
- func: setup
240240
- func: fetch_c_driver_source
241-
- func: install-uv
242241
- func: compile
243242
vars:
244243
build_type: Debug
@@ -250,7 +249,6 @@ tasks:
250249
commands:
251250
- func: setup
252251
- func: fetch_c_driver_source
253-
- func: install-uv
254252
- func: compile
255253
vars:
256254
build_type: Release

.evergreen/scripts/compile.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ set -o pipefail
1414
: "${branch_name:?}"
1515
: "${build_type:?}"
1616
: "${distro_id:?}" # Required by find-cmake-latest.sh.
17-
: "${UV_INSTALL_DIR:?}"
1817

1918
: "${BSON_EXTRA_ALIGNMENT:-}"
2019
: "${BSONCXX_POLYFILL:-}"
@@ -28,6 +27,7 @@ set -o pipefail
2827
: "${USE_SANITIZER_ASAN:-}"
2928
: "${USE_SANITIZER_UBSAN:-}"
3029
: "${USE_STATIC_LIBS:-}"
30+
: "${UV_INSTALL_DIR:-}" # Not on windows-64-vs2015.
3131

3232
mongoc_prefix="$(pwd)/../mongoc"
3333
echo "mongoc_prefix=${mongoc_prefix:?}"
@@ -82,7 +82,14 @@ darwin* | linux*)
8282
esac
8383

8484
# Create a VERSION_CURRENT file in the build directory to include in the dist tarball.
85-
PATH="${UV_INSTALL_DIR:?}:${PATH:-}" uv run --frozen python ./etc/calc_release_version.py >./build/VERSION_CURRENT
85+
if [[ "${distro_id:?}" == windows-64-vs2015* ]]; then
86+
# DEVPROD-13875: Python 3.9 and newer is not available on this distro.
87+
# astral-sh/uv/issues/10231: Astral UV is not able to run properly on this OS+platform either.
88+
# Manually use the Python 3.8 binary instead.
89+
PATH="C:/python/Python38:${PATH:-}" python.exe ./etc/calc_release_version.py >./build/VERSION_CURRENT
90+
else
91+
PATH="${UV_INSTALL_DIR:?}:${PATH:-}" uv run --frozen python ./etc/calc_release_version.py >./build/VERSION_CURRENT
92+
fi
8693
cd build
8794

8895
cmake_flags=(

0 commit comments

Comments
 (0)