mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 02:48:17 +00:00
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:
parent
9d5779b68c
commit
18b53c5b45
7 changed files with 400 additions and 53 deletions
|
@ -3651,6 +3651,14 @@ pub struct ExportArgs {
|
|||
#[command(flatten)]
|
||||
pub refresh: RefreshArgs,
|
||||
|
||||
/// Export the dependencies for 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, conflicts_with_all = ["all_packages", "package", "no_emit_project", "no_emit_workspace"])]
|
||||
pub script: Option<PathBuf>,
|
||||
|
||||
/// The Python interpreter to use during resolution.
|
||||
///
|
||||
/// A Python interpreter is required for building source distributions to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue