Use uv_build in make_project tests (#16298)

Skip downloading and running setuptools.
This commit is contained in:
konsti 2025-10-15 20:45:32 +02:00 committed by GitHub
parent 52cc3c8b94
commit 766bd951cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 6 deletions

View file

@ -1832,19 +1832,18 @@ pub fn make_project(dir: &Path, name: &str, body: &str) -> anyhow::Result<()> {
[project] [project]
name = "{name}" name = "{name}"
version = "0.1.0" version = "0.1.0"
description = "Test package for direct URLs in branches"
requires-python = ">=3.11,<3.13" requires-python = ">=3.11,<3.13"
{body} {body}
[build-system] [build-system]
requires = ["setuptools>=42"] requires = ["uv_build>=0.9.0,<10000"]
build-backend = "setuptools.build_meta" build-backend = "uv_build"
"# "#
}; };
fs_err::create_dir_all(dir)?; fs_err::create_dir_all(dir)?;
fs_err::write(dir.join("pyproject.toml"), pyproject_toml)?; fs_err::write(dir.join("pyproject.toml"), pyproject_toml)?;
fs_err::create_dir(dir.join(name))?; fs_err::create_dir_all(dir.join("src").join(name))?;
fs_err::write(dir.join(name).join("__init__.py"), "")?; fs_err::write(dir.join("src").join(name).join("__init__.py"), "")?;
Ok(()) Ok(())
} }

View file

@ -1983,7 +1983,7 @@ fn workspace_members_with_leading_dot_slash() -> Result<()> {
"###); "###);
// Test syncing from within foo works correctly // Test syncing from within foo works correctly
uv_snapshot!(context.filters(), context.sync().current_dir(workspace.join("packages/foo")), @r###" uv_snapshot!(context.filters(), context.sync().current_dir(workspace.join("packages").join("foo")), @r###"
success: true success: true
exit_code: 0 exit_code: 0
----- stdout ----- ----- stdout -----