Add --script support to uv export for PEP 723 scripts (#10160)
## Summary You can now run `uv export --script main.py` to show the dependency tree for a given script. If a lockfile doesn't exist, it will create one. Closes https://github.com/astral-sh/uv/issues/8609. Closes https://github.com/astral-sh/uv/issues/9657.
This commit is contained in:
@@ -2532,6 +2532,10 @@ uv export [OPTIONS]
|
||||
|
||||
<li><code>lowest-direct</code>: Resolve the lowest compatible version of any direct dependencies, and the highest compatible version of any transitive dependencies</li>
|
||||
</ul>
|
||||
</dd><dt><code>--script</code> <i>script</i></dt><dd><p>Export the dependencies for the specified PEP 723 Python script, rather than the current project.</p>
|
||||
|
||||
<p>If provided, uv will resolve the dependencies based on its inline metadata table, in adherence with PEP 723.</p>
|
||||
|
||||
</dd><dt><code>--upgrade</code>, <code>-U</code></dt><dd><p>Allow package upgrades, ignoring pinned versions in any existing output file. Implies <code>--refresh</code></p>
|
||||
|
||||
</dd><dt><code>--upgrade-package</code>, <code>-P</code> <i>upgrade-package</i></dt><dd><p>Allow upgrades for a specific package, ignoring pinned versions in any existing output file. Implies <code>--refresh-package</code></p>
|
||||
|
||||
Reference in New Issue
Block a user