mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-24 05:35:04 +00:00
Move source distribution unpacking out of build
(#2294)
## Summary If a user provides a source distribution via a direct path, it can either be an archive (like a `.tar.gz` or `.zip` file) or a directory. If the former, we need to extract (e.g., unzip) the contents at some point. Previously, this extraction was in `uv-build`; this PR lifts it up to the distribution database. The first benefit here is that various methods that take the distribution are now simpler, as they can assume a directory. The second benefit is that we no longer extract _multiple times_ when working with a source distribution. (Previously, if we tried to get the metadata, then fell back and built the wheel, we'd extract the wheel _twice_.)
This commit is contained in:
parent
e321a2767d
commit
26f6919465
7 changed files with 107 additions and 47 deletions
|
@ -28,7 +28,7 @@ pub(crate) struct BuildArgs {
|
|||
/// Directory to story the built wheel in
|
||||
#[clap(short, long)]
|
||||
wheels: Option<PathBuf>,
|
||||
/// The source distribution to build, either a directory or a source archive.
|
||||
/// The source distribution to build, as a directory.
|
||||
sdist: PathBuf,
|
||||
/// The subdirectory to build within the source distribution.
|
||||
subdirectory: Option<PathBuf>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue