+v54.2.0
+-------
+
+
+Changes
+^^^^^^^
+* #2608: Added informative error message to PEP 517 build failures owing to
+ an empty ``setup.py`` -- by :user:`layday`
+
+
v54.1.3
-------
Metadata-Version: 2.1
Name: setuptools
-Version: 54.1.3
+Version: 54.2.0
Summary: Easily download, build, install, upgrade, and uninstall Python packages
Home-page: https://github.com/pypa/setuptools
Author: Python Packaging Authority
license_files =
LICENSE
name = setuptools
-version = 54.1.3
+version = 54.2.0
author = Python Packaging Authority
author_email = distutils-sig@python.org
description = Easily download, build, install, upgrade, and uninstall Python packages
Metadata-Version: 2.1
Name: setuptools
-Version: 54.1.3
+Version: 54.2.0
Summary: Easily download, build, install, upgrade, and uninstall Python packages
Home-page: https://github.com/pypa/setuptools
Author: Python Packaging Authority
f for f in os.listdir(directory)
if f.endswith(extension)
)
- file, = matching
+ try:
+ file, = matching
+ except ValueError:
+ raise ValueError(
+ 'No distribution was found. Ensure that `setup.py` '
+ 'is not empty and that it calls `setup()`.')
return file
import tarfile
import importlib
from concurrent import futures
+import re
import pytest
from jaraco import path
with pytest.raises(AssertionError):
build_backend.build_sdist("temp")
+ @pytest.mark.parametrize('build_hook', ('build_sdist', 'build_wheel'))
+ def test_build_with_empty_setuppy(self, build_backend, build_hook):
+ files = {'setup.py': ''}
+ path.build(files)
+
+ with pytest.raises(
+ ValueError,
+ match=re.escape('No distribution was found.')):
+ getattr(build_backend, build_hook)("temp")
+
class TestBuildMetaLegacyBackend(TestBuildMetaBackend):
backend_name = 'setuptools.build_meta:__legacy__'