Add --no-emit-project and friends to uv export (#7110)

## Summary

Like `uv sync`, you can omit the current project (`--no-emit-project`),
a specific package (`--no-emit-package`), or the entire workspace
(`--no-emit-workspace`).

Closes https://github.com/astral-sh/uv/issues/6960.

Closes #6995.
This commit is contained in:
Charlie Marsh 2024-09-05 21:01:46 -04:00 committed by GitHub
parent d0f9016eda
commit 6ae005b0d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 231 additions and 21 deletions

View file

@ -1857,6 +1857,18 @@ uv export [OPTIONS]
<p>May also be set with the <code>UV_NO_CONFIG</code> environment variable.</p>
</dd><dt><code>--no-dev</code></dt><dd><p>Omit development dependencies</p>
</dd><dt><code>--no-emit-package</code> <i>no-emit-package</i></dt><dd><p>Do not emit the given package(s).</p>
<p>By default, all of the project&#8217;s dependencies are included in the exported requirements file. The <code>--no-install-package</code> option allows exclusion of specific packages.</p>
</dd><dt><code>--no-emit-project</code></dt><dd><p>Do not emit the current project.</p>
<p>By default, the current project is included in the exported requirements file with all of its dependencies. The <code>--no-emit-project</code> option allows the project to be excluded, but all of its dependencies to remain included.</p>
</dd><dt><code>--no-emit-workspace</code></dt><dd><p>Do not emit any workspace members, including the root project.</p>
<p>By default, all workspace members and their dependencies are included in the exported requirements file, with all of their dependencies. The <code>--no-emit-workspace</code> option allows exclusion of all the workspace members while retaining their dependencies.</p>
</dd><dt><code>--no-hashes</code></dt><dd><p>Omit hashes in the generated output</p>
</dd><dt><code>--no-index</code></dt><dd><p>Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via <code>--find-links</code></p>