Support empty dependencies in PEP 723 scripts (#5864)

## Summary

Closes https://github.com/astral-sh/uv/issues/5859.
This commit is contained in:
Charlie Marsh 2024-08-07 10:56:05 -04:00 committed by GitHub
parent 8998149ac1
commit 3ae75a21aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 57 additions and 23 deletions

View file

@ -14,7 +14,7 @@ static FINDER: LazyLock<Finder> = LazyLock::new(|| Finder::new(b"# /// script"))
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct Pep723Metadata {
pub dependencies: Vec<pep508_rs::Requirement<VerbatimParsedUrl>>,
pub dependencies: Option<Vec<pep508_rs::Requirement<VerbatimParsedUrl>>>,
pub requires_python: Option<pep440_rs::VersionSpecifiers>,
}