mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
![]() Adds support for the toolchain discovery preferences outlined in https://github.com/astral-sh/uv/issues/4198 but we don't expose this to users yet, I'll do that next to make it easier to review. I've made some refactors in the toolchain discovery implementation to enable this behavior and move us towards clearer abstractions. There's still remaining work here, but I'd prefer tackle things in follow-ups instead of expanding this pull request. I plan on opening a couple before merging this. I'd like to shift the public toolchain API to focus on discovering either an **environment** or a **toolchain**. The first would be used by commands that operate on an environment, while the latter would be used by commands that just need an interpreter to create environments. I haven't changed this here, but some of the refactors are in preparation for supporting this idea. In brief: - We now allow different ordering of installed toolchain discovery based on a `ToolchainPreference` type. This is the type we will expose to users. - `SystemPython` was changed into an `EnvironmentPreference` which is used to determine if we should prefer virtual or system Python environments. - We drop the whole `ToolchainSources` selection concept, it was confusing and the error messages from it were awkward. Most of the functionality is now captured by the preference enums, but you can't do things like "only find a toolchain from the parent interpreter" as easily anymore. |
||
---|---|---|
.. | ||
src | ||
.gitignore | ||
builder.dockerfile | ||
Cargo.toml | ||
test_sdist_building.sh |