diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2020-08-13 18:59:17 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-13 18:59:17 -0400 |
| commit | 6f7c26250a2d9e64a823f10224522dd40d2f163f (patch) | |
| tree | cd7335152a5bc17d9cad0524dce5d836257583fe /setuptools/tests | |
| parent | a42d30089c42605d0f3191e4ccc19e1cfd1e0ccd (diff) | |
| parent | d2883ac4f1d94c16a1ab279e7b1065558b67da4b (diff) | |
| download | python-setuptools-git-6f7c26250a2d9e64a823f10224522dd40d2f163f.tar.gz | |
Merge pull request #2306 from takluyver/pep517-setup-requires
Don't install setup_requires when run as a PEP-517 backend.
Diffstat (limited to 'setuptools/tests')
| -rw-r--r-- | setuptools/tests/test_build_meta.py | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/setuptools/tests/test_build_meta.py b/setuptools/tests/test_build_meta.py index 8fcf3055..fdb4b950 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,35 @@ 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 |
