Commit 8a4b06db authored by Thomas Kluyver's avatar Thomas Kluyver

Add test for PEP 517 backends not installing setup_requires

parent 21c81324
......@@ -380,7 +380,7 @@ class TestBuildMetaBackend:
setup(
name="qux",
version="0.0.0",
py_modules=["hello.py"],
py_modules=["hello"],
setup_requires={setup_literal},
)
""").format(setup_literal=setup_literal),
......@@ -407,6 +407,36 @@ class TestBuildMetaBackend:
assert expected == sorted(actual)
def test_dont_install_setup_requires(self, tmpdir_cwd):
files = {
'setup.py': DALS("""
from setuptools import setup
setup(
name="qux",
version="0.0.0",
py_modules=["hello"],
setup_requires=["does-not-exist >99"],
)
"""),
'hello.py': DALS("""
def run():
print('hello')
"""),
}
build_files(files)
build_backend = self.get_build_backend()
dist_dir = os.path.abspath('pip-dist-info')
os.makedirs(dist_dir)
# does-not-exist can't be satisfied, so if it attempts to install
# setup_requires, it will fail.
build_backend.prepare_metadata_for_build_wheel(dist_dir)
_sys_argv_0_passthrough = {
'setup.py': DALS("""
import os
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment