Skip to content

Commit

Permalink
fixup! fixup! build_meta: produce informative error when a dist is no…
Browse files Browse the repository at this point in the history
…t found
  • Loading branch information
layday committed Mar 21, 2021
1 parent 8f2cc7a commit f3ba213
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions setuptools/build_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ def _file_with_extension(directory, extension):
try:
return next(matching)
except StopIteration:
raise ValueError('No distribution was found. The distribution was '
'possibly not built. Ensure that your `setup.py` '
'is not empty and that it calls `setup()`.')
raise ValueError(
'No distribution was found. Ensure that `setup.py` '
'is not empty and that it calls `setup()`.')


def _open_setup_script(setup_script):
Expand Down
5 changes: 1 addition & 4 deletions setuptools/tests/test_build_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,10 +450,7 @@ def test_build_with_empty_setuppy(self, build_backend, build_hook):

with pytest.raises(
ValueError,
match=re.escape(
'No distribution was found. The distribution was '
'possibly not built. Ensure that your `setup.py` '
'is not empty and that it calls `setup()`.')):
match=re.escape('No distribution was found.')):
getattr(build_backend, build_hook)("temp")


Expand Down

0 comments on commit f3ba213

Please sign in to comment.