mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-25 01:17:36 +00:00
First, replace all usages in files in-place. I used my editor for this. If someone wants to add a one-liner that'd be fun. Then, update directory and file names: ``` # Run twice for nested directories find . -type d -print0 | xargs -0 rename s/puffin/uv/g find . -type d -print0 | xargs -0 rename s/puffin/uv/g # Update files find . -type f -print0 | xargs -0 rename s/puffin/uv/g ``` Then add all the files again ``` # Add all the files again git add crates git add python/uv # This one needs a force-add git add -f crates/uv-trampoline ```
25 lines
881 B
Rust
25 lines
881 B
Rust
use dashmap::DashMap;
|
|
use url::Url;
|
|
|
|
use distribution_types::PackageId;
|
|
use once_map::OnceMap;
|
|
use pypi_types::Metadata21;
|
|
use uv_normalize::PackageName;
|
|
|
|
use super::provider::VersionsResponse;
|
|
|
|
/// In-memory index of package metadata.
|
|
#[derive(Default)]
|
|
pub struct InMemoryIndex {
|
|
/// A map from package name to the metadata for that package and the index where the metadata
|
|
/// came from.
|
|
pub(crate) packages: OnceMap<PackageName, VersionsResponse>,
|
|
|
|
/// A map from package ID to metadata for that distribution.
|
|
pub(crate) distributions: OnceMap<PackageId, Metadata21>,
|
|
|
|
/// A map from source URL to precise URL. For example, the source URL
|
|
/// `git+https://github.com/pallets/flask.git` could be redirected to
|
|
/// `git+https://github.com/pallets/flask.git@c2f65dd1cfff0672b902fd5b30815f0b4137214c`.
|
|
pub(crate) redirects: DashMap<Url, Url>,
|
|
}
|