mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-24 09:06:05 +00:00
Add uv export --format requirements.txt (#6778)
## Summary The interface here is intentionally a bit more limited than `uv pip compile`, because we don't want `requirements.txt` to be a system of record -- it's just an export format. So, we don't write annotation comments (i.e., which dependency is requested from which), we don't allow writing extras, etc. It's just a flat list of requirements, with their markers and hashes. Closes #6007. Closes #6668. Closes #6670.
This commit is contained in:
parent
670e9603ee
commit
cbfc928a9c
21 changed files with 1610 additions and 105 deletions
10
crates/uv-configuration/src/export_format.rs
Normal file
10
crates/uv-configuration/src/export_format.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/// The format to use when exporting a `uv.lock` file.
|
||||
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
|
||||
#[serde(deny_unknown_fields, rename_all = "kebab-case")]
|
||||
#[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
|
||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||
pub enum ExportFormat {
|
||||
/// Export in `requirements.txt` format.
|
||||
#[default]
|
||||
RequirementsTxt,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue