MONGOCRYPT-872 Use uv tool to obtain CMake, Ninja, and Python#1153
Open
eramongodb wants to merge 8 commits intomongodb:masterfrom
Open
MONGOCRYPT-872 Use uv tool to obtain CMake, Ninja, and Python#1153eramongodb wants to merge 8 commits intomongodb:masterfrom
uv tool to obtain CMake, Ninja, and Python#1153eramongodb wants to merge 8 commits intomongodb:masterfrom
Conversation
kevinAlbs
approved these changes
Apr 28, 2026
Collaborator
kevinAlbs
left a comment
There was a problem hiding this comment.
LGTM with minor comments.
| . ./venv/bin/activate | ||
| python -m pip install --prefer-binary -r requirements-test.txt | ||
| python -m pip install -e . | ||
| uv python install |
Collaborator
There was a problem hiding this comment.
Remove uv python install? I expect python is already installed by the uv venv command.
| INSTALLER_PRINT_VERBOSE=1 \ | ||
| "${script:?}" || return | ||
|
|
||
| PATH="${uv_install_dir:?}:$PATH" || return |
Collaborator
There was a problem hiding this comment.
Suggest removing || return since I expect the variable assignment cannot fail.
Suggested change
| PATH="${uv_install_dir:?}:$PATH" || return | |
| PATH="${uv_install_dir:?}:$PATH" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves MONGOCRYPT-872. Successor to mongodb/mongo-cxx-driver#1428 and mongodb/mongo-c-driver#2097.
Introduces the
install-build-tools.shscript, which installs latest versions ofcmake,ninja, andpythonfor subsequent use by build-and-test EVG tasks, reducing dependence on system-provided binaries (numerous inconsistent versions across distros). Because of the age of certain EVG distros still in use by the current configuration, the latestuv-installer.shscript (version 0.11.8) is bundled and used as a fallback when a system-provideduvbinary is not available (see: DEVPROD-13413 and DEVPROD-22169). Note thatuv-installer.shfinally embeds checksums in the script itself, so the checksum patch script used in prior PRs is no longer required.The Earthfile is also updated to install and use
uvwhenever possible (for compatibility with other updated build scripts which now requireuv). When a system package providesuvdirectly, it is used (regardless of its version); otherwise, the newest-availablepipprovided by system packages is used to installuvinstead (always the latest available version). This is made possible following #1148.All calls to
run_*(formerly provided byinit.sh) are replaced with simple commands instead (available viaPATHexported byinstall-build-tools.sh). All calls topythonare invoked throughuv. Note thatinstall-build-tools.shexportsCMAKE_GENERATOR=Ninjaon all non-Windows environments by default, simplifying other helper scripts. However, a comment is added to this line which is responsible for selecting the Ninja generator even on Windows, which as a single-config generator (not-obviously) impacts the layout of build artifacts that are depended-on by downstream test scripts such as bindings/python/.evergreen/test.sh.Due to the age of certain EVG distros (notably RHEL 6 and RHEL 7) which do not provide a sufficiently recent Python version to support
uv, these distros are special-cased to defer partially or entirely to the mongodbtoolchain binaries present in the those environments. These workarounds should be removed once the EVG configuration is updated to migrate away from these EOL, unsupported distros (outside the scope of this PR).