mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-24 21:29:49 +00:00
Support --with-requirements script.py and -r script.py to include inline dependency metadata from another script (#12763)
## Summary Closes #6542 ## Test Plan `cargo test`
This commit is contained in:
parent
e136a51f3d
commit
6eefde28e7
10 changed files with 410 additions and 9 deletions
|
|
@ -1836,7 +1836,7 @@ pub struct PipInstallArgs {
|
|||
#[arg(group = "sources")]
|
||||
pub package: Vec<String>,
|
||||
|
||||
/// Install all packages listed in the given `requirements.txt` or `pylock.toml` files.
|
||||
/// Install all packages listed in the given `requirements.txt`, PEP 723 scripts, or `pylock.toml` files.
|
||||
///
|
||||
/// If a `pyproject.toml`, `setup.py`, or `setup.cfg` file is provided, uv will extract the
|
||||
/// requirements for the relevant project.
|
||||
|
|
@ -3205,7 +3205,8 @@ pub struct RunArgs {
|
|||
#[arg(long)]
|
||||
pub with_editable: Vec<comma::CommaSeparatedRequirements>,
|
||||
|
||||
/// Run with all packages listed in the given `requirements.txt` files.
|
||||
/// Run with all packages listed in the given `requirements.txt` files or PEP 723 Python
|
||||
/// scripts.
|
||||
///
|
||||
/// The same environment semantics as `--with` apply.
|
||||
///
|
||||
|
|
@ -4575,7 +4576,8 @@ pub struct ToolRunArgs {
|
|||
#[arg(long)]
|
||||
pub with_editable: Vec<comma::CommaSeparatedRequirements>,
|
||||
|
||||
/// Run with all packages listed in the given `requirements.txt` files.
|
||||
/// Run with all packages listed in the given `requirements.txt` files or PEP 723 Python
|
||||
/// scripts.
|
||||
#[arg(long, value_delimiter = ',', value_parser = parse_maybe_file_path)]
|
||||
pub with_requirements: Vec<Maybe<PathBuf>>,
|
||||
|
||||
|
|
@ -4705,7 +4707,8 @@ pub struct ToolInstallArgs {
|
|||
#[arg(short = 'w', long)]
|
||||
pub with: Vec<comma::CommaSeparatedRequirements>,
|
||||
|
||||
/// Include all requirements listed in the given `requirements.txt` files.
|
||||
/// Run with all packages listed in the given `requirements.txt` files or PEP 723 Python
|
||||
/// scripts.
|
||||
#[arg(long, value_delimiter = ',', value_parser = parse_maybe_file_path)]
|
||||
pub with_requirements: Vec<Maybe<PathBuf>>,
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue