Add source distribution support to uv-build crate (#6896)

## Summary

Just exposes the correct PEP 517 hooks.
This commit is contained in:
Charlie Marsh 2024-09-02 14:14:49 -04:00 committed by GitHub
parent ea0a0db7a7
commit 42a4d80a63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 81 additions and 50 deletions

View file

@ -6,10 +6,12 @@ use crate::{PackageNameSpecifier, PackageNameSpecifiers};
#[derive(Copy, Clone, Debug, Default, PartialEq, Eq)]
pub enum BuildKind {
/// A regular PEP 517 wheel build
/// A PEP 517 wheel build.
#[default]
Wheel,
/// A PEP 660 editable installation wheel build
/// A PEP 517 source distribution build.
Sdist,
/// A PEP 660 editable installation wheel build.
Editable,
}
@ -17,6 +19,7 @@ impl Display for BuildKind {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
match self {
Self::Wheel => f.write_str("wheel"),
Self::Sdist => f.write_str("sdist"),
Self::Editable => f.write_str("editable"),
}
}