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]
name = "{name}"
version = "0.1.0"
description = "Test package for direct URLs in branches"
requires-python = ">=3.11,<3.13"
{body}
[build-system]
requires = ["setuptools>=42"]
build-backend = "setuptools.build_meta"
requires = ["uv_build>=0.9.0,<10000"]
build-backend = "uv_build"
"#
};
fs_err::create_dir_all(dir)?;
fs_err::write(dir.join("pyproject.toml"), pyproject_toml)?;
fs_err::create_dir(dir.join(name))?;
fs_err::write(dir.join(name).join("__init__.py"), "")?;
fs_err::create_dir_all(dir.join("src").join(name))?;
fs_err::write(dir.join("src").join(name).join("__init__.py"), "")?;
Ok(())
}

View file

@ -1983,7 +1983,7 @@ fn workspace_members_with_leading_dot_slash() -> Result<()> {
"###);
// 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
exit_code: 0
----- stdout -----