Implement pip freeze --path (#10488)

## Summary

Resolves #5952

Add a `--path` option to `uv pip freeze` to be compatible with `pip
freeze`

## Test Plan

New snapshot tests

---------

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
This commit is contained in:
Eric Mark Martin 2025-01-13 17:50:04 -05:00 committed by GitHub
parent 97c1877f6f
commit f261c65bdd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 151 additions and 21 deletions

View file

@ -7045,6 +7045,8 @@ uv pip freeze [OPTIONS]
<p>When disabled, uv will only use locally cached data and locally available files.</p>
<p>May also be set with the <code>UV_OFFLINE</code> environment variable.</p>
</dd><dt><code>--path</code> <i>paths</i></dt><dd><p>Restrict to the specified installation path for listing packages (can be used multiple times)</p>
</dd><dt><code>--project</code> <i>project</i></dt><dd><p>Run the command within the given project directory.</p>
<p>All <code>pyproject.toml</code>, <code>uv.toml</code>, and <code>.python-version</code> files will be discovered by walking up the directory tree from the project root, as will the project&#8217;s virtual environment (<code>.venv</code>).</p>