mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-03 18:38:21 +00:00
Cache the setup.py resolution (#327)
Cache the resolution for the setup.py requirements (`pip`, `setuptools`, `wheels`) across builds.
This commit is contained in:
parent
b2439b24a1
commit
d99ca3159b
4 changed files with 41 additions and 21 deletions
|
@ -7,10 +7,10 @@ use directories::ProjectDirs;
|
|||
use fs_err as fs;
|
||||
|
||||
use platform_host::Platform;
|
||||
use puffin_build::SourceDistributionBuilder;
|
||||
use puffin_client::RegistryClientBuilder;
|
||||
use puffin_dispatch::BuildDispatch;
|
||||
use puffin_interpreter::Virtualenv;
|
||||
use puffin_traits::BuildContext;
|
||||
|
||||
#[derive(Parser)]
|
||||
pub(crate) struct BuildArgs {
|
||||
|
@ -52,13 +52,8 @@ pub(crate) async fn build(args: BuildArgs) -> Result<PathBuf> {
|
|||
venv.interpreter_info().clone(),
|
||||
fs::canonicalize(venv.python_executable())?,
|
||||
);
|
||||
let builder = SourceDistributionBuilder::setup(
|
||||
&args.sdist,
|
||||
args.subdirectory.as_deref(),
|
||||
venv.interpreter_info(),
|
||||
&build_dispatch,
|
||||
)
|
||||
.await?;
|
||||
let wheel = builder.build(&wheel_dir)?;
|
||||
let wheel = build_dispatch
|
||||
.build_source_distribution(&args.sdist, args.subdirectory.as_deref(), &wheel_dir)
|
||||
.await?;
|
||||
Ok(wheel_dir.join(wheel))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue