mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-20 23:31:54 +00:00
fix: expose types to implement custom ResolverProvider
(#1862)
<!-- Thank you for contributing to uv! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary To integrate `uv` into `pixi` I need to specify a custom `ResolverProvider` to be able to specify that some packages are already installed by conda and should not be touched. However, some of the types required to implement your own `ResolverProvider` were not accessible through the public API. This PR basically adds them. ## Test Plan I didnt add an explicit test for this.
This commit is contained in:
parent
e97b094bc9
commit
4e011b305f
4 changed files with 19 additions and 7 deletions
|
@ -181,6 +181,14 @@ impl From<FlatDistributions> for VersionMap {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<BTreeMap<Version, PrioritizedDist>> for VersionMap {
|
||||
fn from(value: BTreeMap<Version, PrioritizedDist>) -> Self {
|
||||
Self {
|
||||
inner: VersionMapInner::Eager(value),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// A lazily initialized distribution.
|
||||
///
|
||||
/// This permits access to a handle that can be turned into a resolvable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue