Skip to content

Commit 2aff099

Browse files
committed
Use Python 3.12 on rhel76
1 parent 5c38578 commit 2aff099

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.evergreen/scripts/compile.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,21 @@ darwin* | linux*)
8080
;;
8181
esac
8282

83-
# Create a VERSION_CURRENT file in the build directory to include in the dist tarball.
84-
PATH="${UV_INSTALL_DIR:?}:${PATH:-}" uv run --frozen python ./etc/calc_release_version.py >./build/VERSION_CURRENT
83+
mkdir -p build
84+
85+
(
86+
# calc_release_version.py is a standalone script.
87+
uv_flags=(--no-project)
88+
89+
# Avoid "error: unknown option `format=...'" with CPython 3.11.
90+
if [[ "${distro_id:?}" == rhel7* ]]; then
91+
uv_flags+=(-p 3.12)
92+
fi
93+
94+
# Create a VERSION_CURRENT file in the build directory to include in the dist tarball.
95+
PATH="${UV_INSTALL_DIR:?}:${PATH:-}" uv run "${uv_flags[@]:?}" python ./etc/calc_release_version.py >./build/VERSION_CURRENT
96+
)
97+
8598
cd build
8699

87100
cmake_flags=(

0 commit comments

Comments
 (0)