mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-27 18:36:44 +00:00
Use Dist in VersionMap (#851)
Refactoring split out from find links support: Find links files can be represented as `Dist`, but not really as `File`, they don't have url nor hashes. `DistRequiresPython` is somewhat odd as an in between type.
This commit is contained in:
parent
1203f8f9e8
commit
858d5584cc
10 changed files with 158 additions and 200 deletions
|
|
@ -1,10 +1,10 @@
|
|||
use url::Url;
|
||||
|
||||
use distribution_types::{IndexUrl, PackageId};
|
||||
use distribution_types::PackageId;
|
||||
use pep440_rs::VersionSpecifiers;
|
||||
use puffin_normalize::PackageName;
|
||||
use puffin_traits::OnceMap;
|
||||
use pypi_types::{BaseUrl, Metadata21};
|
||||
use pypi_types::Metadata21;
|
||||
|
||||
use crate::version_map::VersionMap;
|
||||
|
||||
|
|
@ -13,7 +13,7 @@ use crate::version_map::VersionMap;
|
|||
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)>,
|
||||
pub(crate) packages: OnceMap<PackageName, VersionMap>,
|
||||
|
||||
/// A map from package ID to metadata for that distribution.
|
||||
pub(crate) distributions: OnceMap<PackageId, Metadata21>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue