Add --show-urls and --only-downloads to uv python list (#8062)

These are useful for creating a mirror of the Python downloads for a
given uv version, e.g.:

```
❯ cargo run -q -- python list --show-urls --only-downloads
cpython-3.13.0-macos-aarch64-none     20241008/cpython-3.13.0%2B20241008-aarch64-apple-darwin-install_only_stripped.tar.gz
cpython-3.12.7-macos-aarch64-none     20241008/cpython-3.12.7%2B20241008-aarch64-apple-darwin-install_only_stripped.tar.gz
cpython-3.11.10-macos-aarch64-none    20241008/cpython-3.11.10%2B20241008-aarch64-apple-darwin-install_only_stripped.tar.gz
cpython-3.10.15-macos-aarch64-none    20241008/cpython-3.10.15%2B20241008-aarch64-apple-darwin-install_only_stripped.tar.gz
cpython-3.9.20-macos-aarch64-none     20241008/cpython-3.9.20%2B20241008-aarch64-apple-darwin-install_only_stripped.tar.gz
cpython-3.8.20-macos-aarch64-none     20241002/cpython-3.8.20%2B20241002-aarch64-apple-darwin-install_only_stripped.tar.gz
pypy-3.10.14-macos-aarch64-none       https://downloads.python.org/pypy/pypy3.10-v7.3.17-macos_arm64.tar.bz2
pypy-3.9.19-macos-aarch64-none        https://downloads.python.org/pypy/pypy3.9-v7.3.16-macos_arm64.tar.bz2
pypy-3.8.16-macos-aarch64-none        https://downloads.python.org/pypy/pypy3.8-v7.3.11-macos_arm64.tar.bz2
```
This commit is contained in:
Zanie Blue 2024-12-10 12:52:40 -06:00 committed by GitHub
parent 3ee2b10738
commit 624e79a8a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 111 additions and 55 deletions

View file

@ -4426,6 +4426,10 @@ uv python list [OPTIONS]
<p>When disabled, uv will only use locally cached data and locally available files.</p>
</dd><dt><code>--only-downloads</code></dt><dd><p>Only show Python downloads, exclude installed distributions.</p>
<p>By default, available downloads for the current platform are shown.</p>
</dd><dt><code>--only-installed</code></dt><dd><p>Only show installed Python versions, exclude available downloads.</p>
<p>By default, available downloads for the current platform are shown.</p>
@ -4458,6 +4462,10 @@ uv python list [OPTIONS]
</ul>
</dd><dt><code>--quiet</code>, <code>-q</code></dt><dd><p>Do not print any output</p>
</dd><dt><code>--show-urls</code></dt><dd><p>Show the URLs of available Python downloads.</p>
<p>By default, these display as <code>&lt;download available&gt;</code>.</p>
</dd><dt><code>--verbose</code>, <code>-v</code></dt><dd><p>Use verbose output.</p>
<p>You can configure fine-grained logging using the <code>RUST_LOG</code> environment variable. (&lt;https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives&gt;)</p>