diff options
| author | Thomas Kluyver <thomas@kluyver.me.uk> | 2020-08-06 10:13:21 +0100 |
|---|---|---|
| committer | Thomas Kluyver <thomas@kluyver.me.uk> | 2020-08-06 10:13:21 +0100 |
| commit | 8a4b06dbdde7fb3249329b5311f5b5707510fa88 (patch) | |
| tree | 79f6da0928808dcccb9b1559592e584217d3a204 /setuptools | |
| parent | 21c81324f9e37aee92301f64b95947accfafbaa4 (diff) | |
| download | python-setuptools-git-8a4b06dbdde7fb3249329b5311f5b5707510fa88.tar.gz | |
Add test for PEP 517 backends not installing setup_requires
Diffstat (limited to 'setuptools')
| -rw-r--r-- | setuptools/tests/test_build_meta.py | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 8fcf3055..f1860b69 100644 --- a/setuptools/tests/test_build_meta.py +++ b/setuptools/tests/test_build_meta.py @@ -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 |
