Skip to content

Commit

Permalink
Fail fast when use_2to3 is supplied.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Sep 6, 2021
1 parent 3434226 commit 9f75850
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/2769.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Build now fails fast when ``use_2to3`` is supplied.
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions setuptools/dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9f75850

Please sign in to comment.