mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Add pylock.toml mentions where relevant (#13115)
Just a small PR to add mentions to `pylock.toml` in the CLI manual where appropriate. I tried to say "PEP-751 compatible lock files" when appropriate to also include the case `r"^pylock\.([^.]+)\.toml$"`. Feel free to change that if you think it's cluttery. I also tried to include the "single-use" wording when it made sense. I also have almost never used the `uv pip` interface, so maybe there are some other minor things to add here and there about the usage of `pylock.toml` that I missed. --------- Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
This commit is contained in:
parent
fb08116800
commit
1b23035703
2 changed files with 19 additions and 18 deletions
|
@ -618,21 +618,22 @@ pub struct PipNamespace {
|
|||
|
||||
#[derive(Subcommand)]
|
||||
pub enum PipCommand {
|
||||
/// Compile a `requirements.in` file to a `requirements.txt` file.
|
||||
/// Compile a `requirements.in` file to a `requirements.txt` or `pylock.toml` file.
|
||||
#[command(
|
||||
after_help = "Use `uv help pip compile` for more details.",
|
||||
after_long_help = ""
|
||||
)]
|
||||
Compile(PipCompileArgs),
|
||||
/// Sync an environment with a `requirements.txt` file.
|
||||
/// Sync an environment with a `requirements.txt` or `pylock.toml` file.
|
||||
///
|
||||
/// When syncing an environment, any packages not listed in the `requirements.txt` file will
|
||||
/// be removed. To retain extraneous packages, use `uv pip install` instead.
|
||||
/// When syncing an environment, any packages not listed in the `requirements.txt` or
|
||||
/// `pylock.toml` file will be removed. To retain extraneous packages, use `uv pip install`
|
||||
/// instead.
|
||||
///
|
||||
/// The `requirements.txt` file is presumed to be the output of a `pip compile` or `uv export`
|
||||
/// operation, in which it will include all transitive dependencies. If transitive dependencies
|
||||
/// are not present in the file, they will not be installed. Use `--strict` to warn if any
|
||||
/// transitive dependencies are missing.
|
||||
/// The input file is presumed to be the output of a `pip compile` or `uv export` operation,
|
||||
/// in which it will include all transitive dependencies. If transitive dependencies are not
|
||||
/// present in the file, they will not be installed. Use `--strict` to warn if any transitive
|
||||
/// dependencies are missing.
|
||||
#[command(
|
||||
after_help = "Use `uv help pip sync` for more details.",
|
||||
after_long_help = ""
|
||||
|
@ -815,7 +816,7 @@ pub enum ProjectCommand {
|
|||
Lock(LockArgs),
|
||||
/// Export the project's lockfile to an alternate format.
|
||||
///
|
||||
/// At present, only `requirements-txt` is supported.
|
||||
/// At present, both `requirements.txt` and `pylock.toml` (PEP 751) formats are supported.
|
||||
///
|
||||
/// The project is re-locked before exporting unless the `--locked` or `--frozen` flag is
|
||||
/// provided.
|
||||
|
@ -1605,7 +1606,7 @@ pub struct PipInstallArgs {
|
|||
#[arg(group = "sources")]
|
||||
pub package: Vec<String>,
|
||||
|
||||
/// Install all packages listed in the given `requirements.txt` files.
|
||||
/// Install all packages listed in the given `requirements.txt` or `pylock.toml` files.
|
||||
///
|
||||
/// If a `pyproject.toml`, `setup.py`, or `setup.cfg` file is provided, uv will extract the
|
||||
/// requirements for the relevant project.
|
||||
|
|
|
@ -2214,7 +2214,7 @@ uv lock [OPTIONS]
|
|||
|
||||
Export the project's lockfile to an alternate format.
|
||||
|
||||
At present, only `requirements-txt` is supported.
|
||||
At present, both `requirements.txt` and `pylock.toml` (PEP 751) formats are supported.
|
||||
|
||||
The project is re-locked before exporting unless the `--locked` or `--frozen` flag is provided.
|
||||
|
||||
|
@ -5553,9 +5553,9 @@ uv pip [OPTIONS] <COMMAND>
|
|||
|
||||
<h3 class="cli-reference">Commands</h3>
|
||||
|
||||
<dl class="cli-reference"><dt><a href="#uv-pip-compile"><code>uv pip compile</code></a></dt><dd><p>Compile a <code>requirements.in</code> file to a <code>requirements.txt</code> file</p>
|
||||
<dl class="cli-reference"><dt><a href="#uv-pip-compile"><code>uv pip compile</code></a></dt><dd><p>Compile a <code>requirements.in</code> file to a <code>requirements.txt</code> or <code>pylock.toml</code> file</p>
|
||||
</dd>
|
||||
<dt><a href="#uv-pip-sync"><code>uv pip sync</code></a></dt><dd><p>Sync an environment with a <code>requirements.txt</code> file</p>
|
||||
<dt><a href="#uv-pip-sync"><code>uv pip sync</code></a></dt><dd><p>Sync an environment with a <code>requirements.txt</code> or <code>pylock.toml</code> file</p>
|
||||
</dd>
|
||||
<dt><a href="#uv-pip-install"><code>uv pip install</code></a></dt><dd><p>Install packages into an environment</p>
|
||||
</dd>
|
||||
|
@ -5575,7 +5575,7 @@ uv pip [OPTIONS] <COMMAND>
|
|||
|
||||
### uv pip compile
|
||||
|
||||
Compile a `requirements.in` file to a `requirements.txt` file
|
||||
Compile a `requirements.in` file to a `requirements.txt` or `pylock.toml` file
|
||||
|
||||
<h3 class="cli-reference">Usage</h3>
|
||||
|
||||
|
@ -6141,11 +6141,11 @@ uv pip compile [OPTIONS] <SRC_FILE|--group <GROUP>>
|
|||
|
||||
### uv pip sync
|
||||
|
||||
Sync an environment with a `requirements.txt` file.
|
||||
Sync an environment with a `requirements.txt` or `pylock.toml` file.
|
||||
|
||||
When syncing an environment, any packages not listed in the `requirements.txt` file will be removed. To retain extraneous packages, use `uv pip install` instead.
|
||||
When syncing an environment, any packages not listed in the `requirements.txt` or `pylock.toml` file will be removed. To retain extraneous packages, use `uv pip install` instead.
|
||||
|
||||
The `requirements.txt` file is presumed to be the output of a `pip compile` or `uv export` operation, in which it will include all transitive dependencies. If transitive dependencies are not present in the file, they will not be installed. Use `--strict` to warn if any transitive dependencies are missing.
|
||||
The input file is presumed to be the output of a `pip compile` or `uv export` operation, in which it will include all transitive dependencies. If transitive dependencies are not present in the file, they will not be installed. Use `--strict` to warn if any transitive dependencies are missing.
|
||||
|
||||
<h3 class="cli-reference">Usage</h3>
|
||||
|
||||
|
@ -7050,7 +7050,7 @@ uv pip install [OPTIONS] <PACKAGE|--requirements <REQUIREMENTS>|--editable <EDIT
|
|||
</ul>
|
||||
|
||||
<p>May also be set with the <code>UV_REQUIRE_HASHES</code> environment variable.</p>
|
||||
</dd><dt id="uv-pip-install--requirements"><a href="#uv-pip-install--requirements"><code>--requirements</code></a>, <code>--requirement</code>, <code>-r</code> <i>requirements</i></dt><dd><p>Install all packages listed in the given <code>requirements.txt</code> files.</p>
|
||||
</dd><dt id="uv-pip-install--requirements"><a href="#uv-pip-install--requirements"><code>--requirements</code></a>, <code>--requirement</code>, <code>-r</code> <i>requirements</i></dt><dd><p>Install all packages listed in the given <code>requirements.txt</code> or <code>pylock.toml</code> files.</p>
|
||||
|
||||
<p>If a <code>pyproject.toml</code>, <code>setup.py</code>, or <code>setup.cfg</code> file is provided, uv will extract the requirements for the relevant project.</p>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue