diff --git a/.gitignore b/.gitignore index 27b87a7fa..e11d9ae54 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.t.err # Python cruft +__pycache__ *.pyc # Virtualenvs diff --git a/tests/test_cli_compile.py b/tests/test_cli_compile.py index 2c939ab0f..669201679 100644 --- a/tests/test_cli_compile.py +++ b/tests/test_cli_compile.py @@ -3428,9 +3428,21 @@ def test_compile_recursive_extras_build_targets(runner, tmp_path, current_resolv [project.optional-dependencies] footest = ["small-fake-b"] dev = ["foo[footest]"] + [build-system] + requires = ["setuptools == 70.0.0"] + build-backend = "setuptools.build_meta" """ ) ) + version_constraints = [ + "setuptools<70.1.0", + "wheel<0.43", + ] + constraints_file = tmp_path / "constraints.txt" + constraints_file.write_text("\n".join(version_constraints)) + env = os.environ.copy() # Copy entire env to avoid Windows compatibility issues + # Work around https://github.com/jazzband/pip-tools/pull/1681/files#r1667748889 + env["PIP_CONSTRAINT"] = str(constraints_file) out = runner.invoke( cli, [ @@ -3448,6 +3460,7 @@ def test_compile_recursive_extras_build_targets(runner, tmp_path, current_resolv "--output-file", "-", ], + env=env, ) expected = rf"""foo[footest] @ {tmp_path.as_uri()} small-fake-a==0.2 diff --git a/tests/test_sync.py b/tests/test_sync.py index e84b598ba..f01878bc7 100644 --- a/tests/test_sync.py +++ b/tests/test_sync.py @@ -168,10 +168,7 @@ def test_diff_should_not_uninstall(fake_dist): "pip-tools==1.1.1", "pip-review==1.1.1", "pkg-resources==0.0.0", - "setuptools==34.0.0", - "wheel==0.29.0", "python==3.0", - "distribute==0.1", "wsgiref==0.1", "argparse==0.1", )