mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
mordernize the variant wheel filename formatting and rustfmt
This commit is contained in:
parent
2eca43f406
commit
fd2e13ce4d
4 changed files with 11 additions and 12 deletions
|
@ -35,8 +35,8 @@ use uv_variants::VariantTag;
|
|||
pub struct WheelFilename {
|
||||
pub name: PackageName,
|
||||
pub version: Version,
|
||||
variant: Option<VariantTag>,
|
||||
tags: WheelTag,
|
||||
variant: Option<VariantTag>,
|
||||
}
|
||||
|
||||
impl FromStr for WheelFilename {
|
||||
|
@ -58,11 +58,11 @@ impl Display for WheelFilename {
|
|||
if let Some(variant) = &self.variant {
|
||||
write!(
|
||||
f,
|
||||
"{}-{}-~{}~-{}.whl",
|
||||
"{}-{}-{}-{}.whl",
|
||||
self.name.as_dist_info_name(),
|
||||
self.version,
|
||||
variant,
|
||||
self.tags
|
||||
variant,
|
||||
)
|
||||
} else {
|
||||
write!(
|
||||
|
|
|
@ -5,8 +5,8 @@ use std::sync::Arc;
|
|||
|
||||
use itertools::Itertools;
|
||||
use sha3::{
|
||||
digest::{ExtendableOutput, Update},
|
||||
Shake128,
|
||||
digest::{ExtendableOutput, Update},
|
||||
};
|
||||
|
||||
#[derive(
|
||||
|
|
|
@ -37,7 +37,7 @@ use uv_resolver::{
|
|||
};
|
||||
use uv_torch::{TorchMode, TorchStrategy};
|
||||
use uv_types::{BuildIsolation, HashStrategy};
|
||||
use uv_variants::{get_combinations, VariantSet};
|
||||
use uv_variants::{VariantSet, get_combinations};
|
||||
use uv_warnings::warn_user;
|
||||
use uv_workspace::WorkspaceCache;
|
||||
|
||||
|
@ -464,7 +464,6 @@ pub(crate) async fn pip_install(
|
|||
VariantSet::new(&combinations)?
|
||||
};
|
||||
|
||||
|
||||
let options = OptionsBuilder::new()
|
||||
.resolution_mode(resolution_mode)
|
||||
.prerelease_mode(prerelease_mode)
|
||||
|
@ -492,9 +491,9 @@ pub(crate) async fn pip_install(
|
|||
&upgrade,
|
||||
Some(&tags),
|
||||
Some(&variants),
|
||||
ResolverEnvironment::specific(marker_env.clone()),
|
||||
python_requirement,
|
||||
interpreter.markers(),
|
||||
ResolverEnvironment::specific(marker_env.clone()),
|
||||
python_requirement,
|
||||
interpreter.markers(),
|
||||
Conflicts::empty(),
|
||||
&client,
|
||||
&flat_index,
|
||||
|
|
|
@ -408,9 +408,9 @@ pub(crate) async fn pip_sync(
|
|||
&upgrade,
|
||||
Some(&tags),
|
||||
variants,
|
||||
ResolverEnvironment::specific(marker_env.clone()),
|
||||
python_requirement,
|
||||
interpreter.markers(),
|
||||
ResolverEnvironment::specific(marker_env.clone()),
|
||||
python_requirement,
|
||||
interpreter.markers(),
|
||||
Conflicts::empty(),
|
||||
&client,
|
||||
&flat_index,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue