Rename install-wheel-rs library (#7855)

## Summary

I missed this one in the rename (the crate was renamed, but not the
library).
This commit is contained in:
Charlie Marsh 2024-10-01 20:45:39 -04:00 committed by GitHub
parent 14507a1793
commit f0659e76cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 31 additions and 31 deletions

View file

@ -83,7 +83,6 @@ mod resolver {
use anyhow::Result;
use install_wheel_rs::linker::LinkMode;
use uv_cache::Cache;
use uv_client::RegistryClient;
use uv_configuration::{
@ -93,6 +92,7 @@ mod resolver {
use uv_distribution::DistributionDatabase;
use uv_distribution_types::{DependencyMetadata, IndexCapabilities, IndexLocations};
use uv_git::GitResolver;
use uv_install_wheel::linker::LinkMode;
use uv_pep440::Version;
use uv_pep508::{MarkerEnvironment, MarkerEnvironmentBuilder};
use uv_platform_tags::{Arch, Os, Platform, Tags};

View file

@ -2283,7 +2283,7 @@ pub struct VenvArgs {
/// Defaults to `clone` (also known as Copy-on-Write) on macOS, and `hardlink` on Linux and
/// Windows.
#[arg(long, value_enum, env = "UV_LINK_MODE")]
pub link_mode: Option<install_wheel_rs::linker::LinkMode>,
pub link_mode: Option<uv_install_wheel::linker::LinkMode>,
#[command(flatten)]
pub compat_args: compat::VenvCompatArgs,
@ -3925,7 +3925,7 @@ pub struct InstallerArgs {
env = "UV_LINK_MODE",
help_heading = "Installer options"
)]
pub link_mode: Option<install_wheel_rs::linker::LinkMode>,
pub link_mode: Option<uv_install_wheel::linker::LinkMode>,
/// Compile Python files to bytecode after installation.
///
@ -4123,7 +4123,7 @@ pub struct ResolverArgs {
env = "UV_LINK_MODE",
help_heading = "Installer options"
)]
pub link_mode: Option<install_wheel_rs::linker::LinkMode>,
pub link_mode: Option<uv_install_wheel::linker::LinkMode>,
/// Ignore the `tool.uv.sources` table when resolving dependencies. Used to lock against the
/// standards-compliant, publishable package metadata, as opposed to using any local or Git
@ -4313,7 +4313,7 @@ pub struct ResolverInstallerArgs {
env = "UV_LINK_MODE",
help_heading = "Installer options"
)]
pub link_mode: Option<install_wheel_rs::linker::LinkMode>,
pub link_mode: Option<uv_install_wheel::linker::LinkMode>,
/// Compile Python files to bytecode after installation.
///

View file

@ -49,7 +49,7 @@ pub struct BuildDispatch<'a> {
dependency_metadata: &'a DependencyMetadata,
in_flight: &'a InFlight,
build_isolation: BuildIsolation<'a>,
link_mode: install_wheel_rs::linker::LinkMode,
link_mode: uv_install_wheel::linker::LinkMode,
build_options: &'a BuildOptions,
config_settings: &'a ConfigSettings,
hasher: &'a HashStrategy,
@ -76,7 +76,7 @@ impl<'a> BuildDispatch<'a> {
index_strategy: IndexStrategy,
config_settings: &'a ConfigSettings,
build_isolation: BuildIsolation<'a>,
link_mode: install_wheel_rs::linker::LinkMode,
link_mode: uv_install_wheel::linker::LinkMode,
build_options: &'a BuildOptions,
hasher: &'a HashStrategy,
exclude_newer: Option<ExcludeNewer>,

View file

@ -17,7 +17,7 @@ license = { workspace = true }
workspace = true
[lib]
name = "install_wheel_rs"
name = "uv_install_wheel"
[dependencies]
uv-cache-info = { workspace = true }

View file

@ -1,9 +1,9 @@
use anyhow::{Context, Error, Result};
use install_wheel_rs::{linker::LinkMode, Layout};
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
use std::convert;
use tokio::sync::oneshot;
use tracing::instrument;
use uv_install_wheel::{linker::LinkMode, Layout};
use uv_cache::Cache;
use uv_distribution_types::CachedDist;
@ -29,7 +29,7 @@ impl<'a> Installer<'a> {
}
}
/// Set the [`LinkMode`][`install_wheel_rs::linker::LinkMode`] to use for this installer.
/// Set the [`LinkMode`][`uv_install_wheel::linker::LinkMode`] to use for this installer.
#[must_use]
pub fn with_link_mode(self, link_mode: LinkMode) -> Self {
Self { link_mode, ..self }
@ -136,9 +136,9 @@ fn install(
reporter: Option<Box<dyn Reporter>>,
relocatable: bool,
) -> Result<Vec<CachedDist>> {
let locks = install_wheel_rs::linker::Locks::default();
let locks = uv_install_wheel::linker::Locks::default();
wheels.par_iter().try_for_each(|wheel| {
install_wheel_rs::linker::install_wheel(
uv_install_wheel::linker::install_wheel(
&layout,
relocatable,
wheel.path(),

View file

@ -3,16 +3,16 @@ use uv_distribution_types::{InstalledDist, InstalledEggInfoFile};
/// Uninstall a package from the specified Python environment.
pub async fn uninstall(
dist: &InstalledDist,
) -> Result<install_wheel_rs::Uninstall, UninstallError> {
) -> Result<uv_install_wheel::Uninstall, UninstallError> {
let uninstall = tokio::task::spawn_blocking({
let dist = dist.clone();
move || match dist {
InstalledDist::Registry(_) | InstalledDist::Url(_) => {
Ok(install_wheel_rs::uninstall_wheel(dist.path())?)
Ok(uv_install_wheel::uninstall_wheel(dist.path())?)
}
InstalledDist::EggInfoDirectory(_) => Ok(install_wheel_rs::uninstall_egg(dist.path())?),
InstalledDist::EggInfoDirectory(_) => Ok(uv_install_wheel::uninstall_egg(dist.path())?),
InstalledDist::LegacyEditable(dist) => {
Ok(install_wheel_rs::uninstall_legacy_editable(&dist.egg_link)?)
Ok(uv_install_wheel::uninstall_legacy_editable(&dist.egg_link)?)
}
InstalledDist::EggInfoFile(dist) => Err(UninstallError::Distutils(dist)),
}
@ -27,7 +27,7 @@ pub enum UninstallError {
#[error("Unable to uninstall `{0}`. distutils-installed distributions do not include the metadata required to uninstall safely.")]
Distutils(InstalledEggInfoFile),
#[error(transparent)]
Uninstall(#[from] install_wheel_rs::Error),
Uninstall(#[from] uv_install_wheel::Error),
#[error(transparent)]
Join(#[from] tokio::task::JoinError),
}

View file

@ -11,11 +11,11 @@ use serde::{Deserialize, Serialize};
use thiserror::Error;
use tracing::{trace, warn};
use install_wheel_rs::Layout;
use uv_cache::{Cache, CacheBucket, CachedByTimestamp, Freshness};
use uv_cache_info::Timestamp;
use uv_cache_key::cache_digest;
use uv_fs::{write_atomic_sync, PythonExt, Simplified};
use uv_install_wheel::Layout;
use uv_pep440::Version;
use uv_pep508::{MarkerEnvironment, StringVersion};
use uv_platform_tags::Platform;

View file

@ -2,11 +2,11 @@ use std::num::NonZeroUsize;
use std::path::PathBuf;
use url::Url;
use install_wheel_rs::linker::LinkMode;
use uv_configuration::{
ConfigSettings, IndexStrategy, KeyringProviderType, TargetTriple, TrustedPublishing,
};
use uv_distribution_types::IndexUrl;
use uv_install_wheel::linker::LinkMode;
use uv_pypi_types::SupportedEnvironments;
use uv_python::{PythonDownloads, PythonPreference, PythonVersion};
use uv_resolver::{AnnotationStyle, ExcludeNewer, PrereleaseMode, ResolutionMode};

View file

@ -1,6 +1,5 @@
use std::{fmt::Debug, num::NonZeroUsize, path::PathBuf};
use install_wheel_rs::linker::LinkMode;
use serde::{Deserialize, Serialize};
use url::Url;
use uv_cache_info::CacheKey;
@ -9,6 +8,7 @@ use uv_configuration::{
TrustedHost, TrustedPublishing,
};
use uv_distribution_types::{FlatIndexLocation, IndexUrl, StaticMetadata};
use uv_install_wheel::linker::LinkMode;
use uv_macros::{CombineOptions, OptionsMetadata};
use uv_normalize::{ExtraName, PackageName};
use uv_pep508::Requirement;

View file

@ -13,7 +13,7 @@ use fs_err::File;
use thiserror::Error;
use tracing::{debug, warn};
use install_wheel_rs::read_record_file;
use uv_install_wheel::read_record_file;
pub use receipt::ToolReceipt;
pub use tool::{Tool, ToolEntrypoint};
@ -37,7 +37,7 @@ pub enum Error {
#[error(transparent)]
VirtualEnvError(#[from] uv_virtualenv::Error),
#[error("Failed to read package entry points {0}")]
EntrypointRead(#[from] install_wheel_rs::Error),
EntrypointRead(#[from] uv_install_wheel::Error),
#[error("Failed to find dist-info directory `{0}` in environment at {1}")]
DistInfoMissing(String, PathBuf),
#[error("Failed to find a directory for executables")]

View file

@ -5,10 +5,10 @@ use std::io::Write as _;
use std::path::{Path, PathBuf};
use anyhow::Result;
use install_wheel_rs::linker::LinkMode;
use owo_colors::OwoColorize;
use uv_distribution_filename::SourceDistExtension;
use uv_distribution_types::{DependencyMetadata, IndexLocations};
use uv_install_wheel::linker::LinkMode;
use uv_auth::store_credentials_from_url;
use uv_cache::Cache;

View file

@ -6,7 +6,6 @@ use itertools::Itertools;
use owo_colors::OwoColorize;
use tracing::debug;
use install_wheel_rs::linker::LinkMode;
use uv_auth::store_credentials_from_url;
use uv_cache::Cache;
use uv_client::{BaseClientBuilder, Connectivity, FlatIndexClient, RegistryClientBuilder};
@ -22,6 +21,7 @@ use uv_distribution_types::{
};
use uv_fs::Simplified;
use uv_git::GitResolver;
use uv_install_wheel::linker::LinkMode;
use uv_normalize::PackageName;
use uv_pypi_types::{Requirement, SupportedEnvironments};
use uv_python::{

View file

@ -4,7 +4,6 @@ use itertools::Itertools;
use owo_colors::OwoColorize;
use tracing::{debug, enabled, Level};
use install_wheel_rs::linker::LinkMode;
use uv_auth::store_credentials_from_url;
use uv_cache::Cache;
use uv_client::{BaseClientBuilder, Connectivity, FlatIndexClient, RegistryClientBuilder};
@ -19,6 +18,7 @@ use uv_distribution_types::{
UnresolvedRequirementSpecification,
};
use uv_fs::Simplified;
use uv_install_wheel::linker::LinkMode;
use uv_installer::{SatisfiesResult, SitePackages};
use uv_pep508::PackageName;
use uv_pypi_types::Requirement;

View file

@ -8,7 +8,6 @@ use std::fmt::Write;
use std::path::PathBuf;
use tracing::debug;
use install_wheel_rs::linker::LinkMode;
use uv_cache::Cache;
use uv_client::{BaseClientBuilder, RegistryClient};
use uv_configuration::{
@ -25,6 +24,7 @@ use uv_distribution_types::{
DistributionMetadata, IndexLocations, InstalledMetadata, Name, Resolution,
};
use uv_fs::Simplified;
use uv_install_wheel::linker::LinkMode;
use uv_installer::{Plan, Planner, Preparer, SitePackages};
use uv_normalize::{GroupName, PackageName};
use uv_platform_tags::Tags;
@ -487,7 +487,7 @@ pub(crate) async fn install(
);
}
Err(uv_installer::UninstallError::Uninstall(
install_wheel_rs::Error::MissingRecord(_),
uv_install_wheel::Error::MissingRecord(_),
)) => {
warn_user!(
"Failed to uninstall package at {} due to missing `RECORD` file. Installation may result in an incomplete environment.",
@ -495,7 +495,7 @@ pub(crate) async fn install(
);
}
Err(uv_installer::UninstallError::Uninstall(
install_wheel_rs::Error::MissingTopLevel(_),
uv_install_wheel::Error::MissingTopLevel(_),
)) => {
warn_user!(
"Failed to uninstall package at {} due to missing `top-level.txt` file. Installation may result in an incomplete environment.",

View file

@ -4,7 +4,6 @@ use anyhow::Result;
use owo_colors::OwoColorize;
use tracing::debug;
use install_wheel_rs::linker::LinkMode;
use uv_auth::store_credentials_from_url;
use uv_cache::Cache;
use uv_client::{BaseClientBuilder, Connectivity, FlatIndexClient, RegistryClientBuilder};
@ -16,6 +15,7 @@ use uv_configuration::{KeyringProviderType, TargetTriple};
use uv_dispatch::BuildDispatch;
use uv_distribution_types::{DependencyMetadata, IndexLocations, Resolution};
use uv_fs::Simplified;
use uv_install_wheel::linker::LinkMode;
use uv_installer::SitePackages;
use uv_pep508::PackageName;
use uv_python::{

View file

@ -9,7 +9,6 @@ use miette::{Diagnostic, IntoDiagnostic};
use owo_colors::OwoColorize;
use thiserror::Error;
use install_wheel_rs::linker::LinkMode;
use uv_auth::store_credentials_from_url;
use uv_cache::Cache;
use uv_client::{BaseClientBuilder, Connectivity, FlatIndexClient, RegistryClientBuilder};
@ -20,6 +19,7 @@ use uv_configuration::{
use uv_dispatch::BuildDispatch;
use uv_distribution_types::{DependencyMetadata, IndexLocations};
use uv_fs::Simplified;
use uv_install_wheel::linker::LinkMode;
use uv_pypi_types::Requirement;
use uv_python::{
EnvironmentPreference, PythonDownloads, PythonInstallation, PythonPreference, PythonRequest,

View file

@ -4,7 +4,6 @@ use std::path::PathBuf;
use std::process;
use std::str::FromStr;
use install_wheel_rs::linker::LinkMode;
use url::Url;
use uv_cache::{CacheArgs, Refresh};
use uv_cli::{
@ -26,6 +25,7 @@ use uv_configuration::{
TrustedPublishing, Upgrade, VersionControlSystem,
};
use uv_distribution_types::{DependencyMetadata, IndexLocations};
use uv_install_wheel::linker::LinkMode;
use uv_normalize::PackageName;
use uv_pep508::{ExtraName, RequirementOrigin};
use uv_pypi_types::{Requirement, SupportedEnvironments};