mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-27 02:17:08 +00:00
Split resolver.rs into a module (#752)
This is just getting hard to navigate. No code changes, just moving stuff around.
This commit is contained in:
parent
48c7359622
commit
a8e52d2899
6 changed files with 226 additions and 187 deletions
26
crates/puffin-resolver/src/resolver/index.rs
Normal file
26
crates/puffin-resolver/src/resolver/index.rs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
use url::Url;
|
||||
|
||||
use distribution_types::{IndexUrl, PackageId};
|
||||
use pep440_rs::VersionSpecifiers;
|
||||
use puffin_normalize::PackageName;
|
||||
use puffin_traits::OnceMap;
|
||||
use pypi_types::{BaseUrl, Metadata21};
|
||||
|
||||
use crate::version_map::VersionMap;
|
||||
|
||||
/// In-memory index of package metadata.
|
||||
#[derive(Default)]
|
||||
pub(crate) struct Index {
|
||||
/// A map from package name to the metadata for that package and the index where the metadata
|
||||
/// came from.
|
||||
pub(crate) packages: OnceMap<PackageName, (IndexUrl, BaseUrl, VersionMap)>,
|
||||
|
||||
/// A map from package ID to metadata for that distribution.
|
||||
pub(crate) distributions: OnceMap<PackageId, Metadata21>,
|
||||
|
||||
/// A map from package ID to required Python version.
|
||||
pub(crate) incompatibilities: OnceMap<PackageId, VersionSpecifiers>,
|
||||
|
||||
/// A map from source URL to precise URL.
|
||||
pub(crate) redirects: OnceMap<Url, Url>,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue