Skip to content

Commit 08087ba

Browse files
authored
Merge pull request #11372 from sbidoul/setuptools-64-support-sbi
Fix tests that relied on setuptools not supporting PEP 660
2 parents 7aa49dd + be718ff commit 08087ba

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

tests/functional/test_install.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -700,17 +700,27 @@ def test_editable_install__local_dir_no_setup_py(
700700
)
701701

702702

703+
@pytest.mark.network
703704
def test_editable_install__local_dir_no_setup_py_with_pyproject(
704705
script: PipTestEnvironment,
705706
) -> None:
706707
"""
707708
Test installing in editable mode from a local directory with no setup.py
708-
but that does have pyproject.toml.
709+
but that does have pyproject.toml with a build backend that does not support
710+
the build_editable hook.
709711
"""
710712
local_dir = script.scratch_path.joinpath("temp")
711713
local_dir.mkdir()
712714
pyproject_path = local_dir.joinpath("pyproject.toml")
713-
pyproject_path.write_text("")
715+
pyproject_path.write_text(
716+
textwrap.dedent(
717+
"""
718+
[build-system]
719+
requires = ["setuptools<64"]
720+
build-backend = "setuptools.build_meta"
721+
"""
722+
)
723+
)
714724

715725
result = script.pip("install", "-e", local_dir, expect_error=True)
716726
assert not result.files_created
@@ -1253,13 +1263,14 @@ def test_install_editable_with_prefix_setup_py(script: PipTestEnvironment) -> No
12531263
_test_install_editable_with_prefix(script, {"setup.py": setup_py})
12541264

12551265

1266+
@pytest.mark.network
12561267
def test_install_editable_with_prefix_setup_cfg(script: PipTestEnvironment) -> None:
12571268
setup_cfg = """[metadata]
12581269
name = pkga
12591270
version = 0.1
12601271
"""
12611272
pyproject_toml = """[build-system]
1262-
requires = ["setuptools", "wheel"]
1273+
requires = ["setuptools<64", "wheel"]
12631274
build-backend = "setuptools.build_meta"
12641275
"""
12651276
_test_install_editable_with_prefix(

0 commit comments

Comments
 (0)