diff --git a/crates/uv/src/commands/mod.rs b/crates/uv/src/commands/mod.rs index 929c11083..be9b09228 100644 --- a/crates/uv/src/commands/mod.rs +++ b/crates/uv/src/commands/mod.rs @@ -8,14 +8,14 @@ pub(crate) use cache_clean::cache_clean; pub(crate) use cache_dir::cache_dir; pub(crate) use cache_prune::cache_prune; use distribution_types::InstalledMetadata; -pub(crate) use pip_check::pip_check; -pub(crate) use pip_compile::{extra_name_with_clap_error, pip_compile}; -pub(crate) use pip_freeze::pip_freeze; -pub(crate) use pip_install::pip_install; -pub(crate) use pip_list::pip_list; -pub(crate) use pip_show::pip_show; -pub(crate) use pip_sync::pip_sync; -pub(crate) use pip_uninstall::pip_uninstall; +pub(crate) use pip::check::pip_check; +pub(crate) use pip::compile::{extra_name_with_clap_error, pip_compile}; +pub(crate) use pip::freeze::pip_freeze; +pub(crate) use pip::install::pip_install; +pub(crate) use pip::list::pip_list; +pub(crate) use pip::show::pip_show; +pub(crate) use pip::sync::pip_sync; +pub(crate) use pip::uninstall::pip_uninstall; pub(crate) use project::lock::lock; pub(crate) use project::run::run; pub(crate) use project::sync::sync; @@ -34,14 +34,7 @@ use crate::printer::Printer; mod cache_clean; mod cache_dir; mod cache_prune; -mod pip_check; -mod pip_compile; -mod pip_freeze; -mod pip_install; -mod pip_list; -mod pip_show; -mod pip_sync; -mod pip_uninstall; +mod pip; mod project; mod reporters; #[cfg(feature = "self-update")] diff --git a/crates/uv/src/commands/pip_check.rs b/crates/uv/src/commands/pip/check.rs similarity index 100% rename from crates/uv/src/commands/pip_check.rs rename to crates/uv/src/commands/pip/check.rs diff --git a/crates/uv/src/commands/pip_compile.rs b/crates/uv/src/commands/pip/compile.rs similarity index 100% rename from crates/uv/src/commands/pip_compile.rs rename to crates/uv/src/commands/pip/compile.rs diff --git a/crates/uv/src/commands/pip_freeze.rs b/crates/uv/src/commands/pip/freeze.rs similarity index 100% rename from crates/uv/src/commands/pip_freeze.rs rename to crates/uv/src/commands/pip/freeze.rs diff --git a/crates/uv/src/commands/pip_install.rs b/crates/uv/src/commands/pip/install.rs similarity index 99% rename from crates/uv/src/commands/pip_install.rs rename to crates/uv/src/commands/pip/install.rs index 5e1b7a2bf..a988cdf66 100644 --- a/crates/uv/src/commands/pip_install.rs +++ b/crates/uv/src/commands/pip/install.rs @@ -5,6 +5,7 @@ use std::path::Path; use anstream::eprint; use anyhow::{anyhow, Context, Result}; use fs_err as fs; +use indexmap::IndexMap; use itertools::Itertools; use owo_colors::OwoColorize; use tempfile::tempdir_in; @@ -15,7 +16,6 @@ use distribution_types::{ LocalEditable, LocalEditables, Name, ParsedUrl, ParsedUrlError, RequirementSource, Resolution, }; use distribution_types::{Requirement, Requirements}; -use indexmap::IndexMap; use install_wheel_rs::linker::LinkMode; use pep440_rs::{VersionSpecifier, VersionSpecifiers}; use pep508_rs::{MarkerEnvironment, VerbatimUrl}; @@ -53,11 +53,10 @@ use uv_types::{BuildIsolation, HashStrategy, InFlight}; use uv_warnings::warn_user; use crate::commands::reporters::{DownloadReporter, InstallReporter, ResolverReporter}; +use crate::commands::DryRunEvent; use crate::commands::{compile_bytecode, elapsed, ChangeEvent, ChangeEventKind, ExitStatus}; use crate::printer::Printer; -use super::DryRunEvent; - /// Install packages into the current environment. #[allow(clippy::too_many_arguments, clippy::fn_params_excessive_bools)] pub(crate) async fn pip_install( diff --git a/crates/uv/src/commands/pip_list.rs b/crates/uv/src/commands/pip/list.rs similarity index 99% rename from crates/uv/src/commands/pip_list.rs rename to crates/uv/src/commands/pip/list.rs index b8cc946eb..5b9188147 100644 --- a/crates/uv/src/commands/pip_list.rs +++ b/crates/uv/src/commands/pip/list.rs @@ -16,10 +16,9 @@ use uv_interpreter::PythonEnvironment; use uv_normalize::PackageName; use crate::commands::ExitStatus; +use crate::commands::ListFormat; use crate::printer::Printer; -use super::ListFormat; - /// Enumerate the installed packages in the current environment. #[allow(clippy::too_many_arguments, clippy::fn_params_excessive_bools)] pub(crate) fn pip_list( diff --git a/crates/uv/src/commands/pip/mod.rs b/crates/uv/src/commands/pip/mod.rs new file mode 100644 index 000000000..98c883c21 --- /dev/null +++ b/crates/uv/src/commands/pip/mod.rs @@ -0,0 +1,8 @@ +pub(crate) mod check; +pub(crate) mod compile; +pub(crate) mod freeze; +pub(crate) mod install; +pub(crate) mod list; +pub(crate) mod show; +pub(crate) mod sync; +pub(crate) mod uninstall; diff --git a/crates/uv/src/commands/pip_show.rs b/crates/uv/src/commands/pip/show.rs similarity index 100% rename from crates/uv/src/commands/pip_show.rs rename to crates/uv/src/commands/pip/show.rs diff --git a/crates/uv/src/commands/pip_sync.rs b/crates/uv/src/commands/pip/sync.rs similarity index 100% rename from crates/uv/src/commands/pip_sync.rs rename to crates/uv/src/commands/pip/sync.rs diff --git a/crates/uv/src/commands/pip_uninstall.rs b/crates/uv/src/commands/pip/uninstall.rs similarity index 100% rename from crates/uv/src/commands/pip_uninstall.rs rename to crates/uv/src/commands/pip/uninstall.rs