Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions crates/uv-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6272,6 +6272,12 @@ pub struct PythonListArgs {
#[arg(long, alias = "all_architectures")]
pub all_arches: bool,

/// List all Python variant builds, including debug builds.
///
/// By default, debug builds are hidden from the output.
#[arg(long)]
pub all_variants: bool,

/// Only show installed Python versions.
///
/// By default, installed distributions and available downloads for the current platform are shown.
Expand Down
7 changes: 5 additions & 2 deletions crates/uv/src/commands/python/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ pub(crate) async fn list(
all_versions: bool,
all_platforms: bool,
all_arches: bool,
all_variants: bool,
show_urls: bool,
output_format: PythonListFormat,
python_downloads_json_url: Option<String>,
Expand All @@ -86,6 +87,9 @@ pub(crate) async fn list(
ManagedPythonDownloadList::new(&client, python_downloads_json_url.as_deref()).await?;
let mut output = BTreeSet::new();
if let Some(base_download_request) = base_download_request {
// Check before the move since `base_download_request` is consumed below
let show_debug = all_variants || base_download_request.allows_debug();

let download_request = match kinds {
PythonListKinds::Installed => None,
PythonListKinds::Downloads => Some(if all_platforms {
Expand Down Expand Up @@ -118,8 +122,7 @@ pub(crate) async fn list(
.map(|request| download_list.iter_matching(request))
.into_iter()
.flatten()
// TODO(zanieb): Add a way to show debug downloads, we just hide them for now
.filter(|download| !download.key().variant().is_debug());
.filter(|download| show_debug || !download.key().variant().is_debug());

for download in downloads {
output.insert((
Expand Down
1 change: 1 addition & 0 deletions crates/uv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1707,6 +1707,7 @@ async fn run(cli: Cli) -> Result<ExitStatus> {
args.all_versions,
args.all_platforms,
args.all_arches,
args.all_variants,
args.show_urls,
args.output_format,
args.python_downloads_json_url,
Expand Down
3 changes: 3 additions & 0 deletions crates/uv/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1191,6 +1191,7 @@ pub(crate) struct PythonListSettings {
pub(crate) all_platforms: bool,
pub(crate) all_arches: bool,
pub(crate) all_versions: bool,
pub(crate) all_variants: bool,
pub(crate) show_urls: bool,
pub(crate) output_format: PythonListFormat,
pub(crate) python_downloads_json_url: Option<String>,
Expand All @@ -1211,6 +1212,7 @@ impl PythonListSettings {
all_versions,
all_platforms,
all_arches,
all_variants,
only_installed,
only_downloads,
show_urls,
Expand Down Expand Up @@ -1265,6 +1267,7 @@ impl PythonListSettings {
all_platforms,
all_arches,
all_versions,
all_variants,
show_urls,
output_format,
python_downloads_json_url,
Expand Down
Loading