mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-03 02:22:19 +00:00
Add --script
support to uv tree
for PEP 723 scripts (#10159)
## Summary You can now run `uv tree --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/7328.
This commit is contained in:
parent
31b2d3f988
commit
9d5779b68c
7 changed files with 483 additions and 13 deletions
|
@ -3437,6 +3437,14 @@ pub struct TreeArgs {
|
|||
#[command(flatten)]
|
||||
pub resolver: ResolverArgs,
|
||||
|
||||
/// Show the dependency tree the specified PEP 723 Python script, rather than the current
|
||||
/// project.
|
||||
///
|
||||
/// If provided, uv will resolve the dependencies based on its inline metadata table, in
|
||||
/// adherence with PEP 723.
|
||||
#[arg(long)]
|
||||
pub script: Option<PathBuf>,
|
||||
|
||||
/// The Python version to use when filtering the tree.
|
||||
///
|
||||
/// For example, pass `--python-version 3.10` to display the dependencies
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue