diff --git a/changelog.d/2769.misc.rst b/changelog.d/2769.misc.rst new file mode 100644 index 0000000000..503b4208a9 --- /dev/null +++ b/changelog.d/2769.misc.rst @@ -0,0 +1 @@ +Build now fails fast when ``use_2to3`` is supplied. diff --git a/setup.cfg b/setup.cfg index 30817c00e6..859bf7283b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -124,6 +124,7 @@ distutils.setup_keywords = dependency_links = setuptools.dist:assert_string_list test_loader = setuptools.dist:check_importable test_runner = setuptools.dist:check_importable + use_2to3 = setuptools.dist:invalid egg_info.writers = PKG-INFO = setuptools.command.egg_info:write_pkg_info requires.txt = setuptools.command.egg_info:write_requirements diff --git a/setuptools/dist.py b/setuptools/dist.py index 02ebd635b8..3363495c91 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -289,6 +289,10 @@ def assert_bool(dist, attr, value): raise DistutilsSetupError(tmpl.format(attr=attr, value=value)) +def invalid(dist, attr, value): + raise DistutilsSetupError(f"{attr} is invalid.") + + def check_requirements(dist, attr, value): """Verify that install_requires is a valid requirements list""" try: