diff --git a/README.md b/README.md index 2e307b9..d8319c7 100644 --- a/README.md +++ b/README.md @@ -64,8 +64,10 @@ To use the [pre-commit](https://pre-commit.com) integration, put this in your This requires your build dependencies, but in doing so, it can cache the environment, making it quite fast. The installation is handled by pre-commit; see [`pre-commit-uv`](https://pypi.org/p/pre-commit-uv) if you want to try to -optimize the initial setup. If you don't mind slower runs and don't want to -require a build dependency listing: +optimize the initial setup. If uv is present (including in your +`additional_dependencies`), the build will be slightly faster, as uv is used to +do the build. If you don't mind slower runs and don't want to require a build +dependency listing: ```yaml - repo: https://github.com/henryiii/check-sdist diff --git a/tests/test_downstream.py b/tests/test_downstream.py index 3a15439..4f236c9 100644 --- a/tests/test_downstream.py +++ b/tests/test_downstream.py @@ -7,6 +7,7 @@ from check_sdist.__main__ import compare from check_sdist._compat import tomllib +from check_sdist.sdist import get_uv DIR = Path(__file__).parent.resolve() @@ -14,10 +15,19 @@ packages = tomllib.load(f)["packages"] +@pytest.mark.parametrize( + "installer", + [ + pytest.param( + "uv", marks=pytest.mark.skipif(get_uv() is None, reason="uv not found") + ), + "pip", + ], +) @pytest.mark.parametrize( ("repo", "ref", "fail"), [(x["repo"], x["ref"], x.get("fail", 0)) for x in packages] ) -def test_packages(repo, ref, fail, tmp_path, monkeypatch): +def test_packages(repo, ref, fail, tmp_path, monkeypatch, installer): monkeypatch.chdir(tmp_path) cmd = [ "git", @@ -29,4 +39,4 @@ def test_packages(repo, ref, fail, tmp_path, monkeypatch): ] subprocess.run(cmd, check=True) package_path = tmp_path / repo.split("/")[1] - assert compare(package_path, isolated=True) == fail + assert compare(package_path, isolated=True, installer=installer) == fail