mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Add uv export
support for PEP 751 (#12955)
## Summary This PR adds `uv export` support for [PEP 751](https://peps.python.org/pep-0751). We don't yet expose a way to consume the generated lockfile, but it's a first step. The logic to go from `uv.lock` to "flat set of packages to include, with markers telling us when to include them" is all shared with the `requirements.txt` export (and extracted in https://github.com/astral-sh/uv/pull/12956). So most of the code is just converting from our internal types to the PEP 751 schema.
This commit is contained in:
parent
9484e3663c
commit
d8cea2fd49
10 changed files with 1413 additions and 39 deletions
|
@ -3763,7 +3763,7 @@ pub struct TreeArgs {
|
|||
pub struct ExportArgs {
|
||||
/// The format to which `uv.lock` should be exported.
|
||||
///
|
||||
/// At present, only `requirements-txt` is supported.
|
||||
/// Supports both `requirements.txt` and `pylock.toml` (PEP 751) output formats.
|
||||
#[arg(long, value_enum, default_value_t = ExportFormat::default())]
|
||||
pub format: ExportFormat,
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue