Support uv run -m foo to run a module (#7754)

## Summary

This is another attempt using `module: bool` instead of `module:
Option<String>` following #7322.
The original PR can't be reopened after a force-push to the branch, I've
created this new PR.

Resolves #6638
This commit is contained in:
Jo 2024-09-28 23:07:21 +08:00 committed by GitHub
parent 1cae78dd03
commit 0dbf9ae4a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 81 additions and 10 deletions

View file

@ -217,6 +217,10 @@ uv run [OPTIONS] <COMMAND>
<p>Requires that the lockfile is up-to-date. If the lockfile is missing or needs to be updated, uv will exit with an error.</p>
</dd><dt><code>--module</code>, <code>-m</code></dt><dd><p>Run a Python module.</p>
<p>Equivalent to <code>python -m &lt;module&gt;</code>.</p>
</dd><dt><code>--native-tls</code></dt><dd><p>Whether to load TLS certificates from the platform&#8217;s native certificate store.</p>
<p>By default, uv loads certificates from the bundled <code>webpki-roots</code> crate. The <code>webpki-roots</code> are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS).</p>
@ -380,7 +384,7 @@ uv run [OPTIONS] <COMMAND>
<p>When used in a project, these dependencies will be layered on top of the project environment in a separate, ephemeral environment. These dependencies are allowed to conflict with those specified by the project.</p>
</dd><dt><code>--with-editable</code> <i>with-editable</i></dt><dd><p>Run with the given packages installed as editables</p>
</dd><dt><code>--with-editable</code> <i>with-editable</i></dt><dd><p>Run with the given packages installed as editables.</p>
<p>When used in a project, these dependencies will be layered on top of the project environment in a separate, ephemeral environment. These dependencies are allowed to conflict with those specified by the project.</p>