Sort dependencies before wheels and source distributions (#4897)

Closes https://github.com/astral-sh/uv/issues/4889.
This commit is contained in:
Charlie Marsh 2024-07-08 09:25:05 -05:00 committed by GitHub
parent b9d661012d
commit 71c6a9fad3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 60 additions and 60 deletions

View file

@ -817,10 +817,6 @@ impl Distribution {
self.id.to_toml(None, &mut table);
if let Some(ref sdist) = self.sdist {
table.insert("sdist", value(sdist.to_toml()?));
}
if !self.dependencies.is_empty() {
let deps = each_element_on_its_line_array(
self.dependencies
@ -854,6 +850,10 @@ impl Distribution {
table.insert("dev-dependencies", Item::Table(dev_dependencies));
}
if let Some(ref sdist) = self.sdist {
table.insert("sdist", value(sdist.to_toml()?));
}
if !self.wheels.is_empty() {
let wheels = each_element_on_its_line_array(
self.wheels