Add uv sync --no-install-package to skip installation of specific packages (#6540)

Extends #6538 / #6539
See #4028

Allows excluding arbitrary packages from the sync.
This commit is contained in:
Zanie Blue 2024-08-23 15:48:04 -05:00 committed by GitHub
parent ca50243174
commit d1cbcb30e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 109 additions and 7 deletions

View file

@ -1170,6 +1170,10 @@ uv sync [OPTIONS]
</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>
</dd><dt><code>--no-install-package</code> <i>no-install-package</i></dt><dd><p>Do not install the given package(s).</p>
<p>By default, all of the project&#8217;s dependencies are installed into the environment. The <code>--no-install-package</code> option allows exclusion of specific packages. Note this can result in a broken environment, and should be used with caution.</p>
</dd><dt><code>--no-install-project</code></dt><dd><p>Do not install the current project.</p>
<p>By default, the current project is installed into the environment with all of its dependencies. The <code>--no-install-project</code> option allows the project to be excluded, but all of its dependencies are still installed. This is particularly useful in situations like building Docker images where installing the project separately from its dependencies allows optimal layer caching.</p>