Skip to content

Commit

Permalink
Emit a SetuptoolsDeprecationWarning when setup_requires is used. Ref #…
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Oct 22, 2021
1 parent fee9d17 commit beb4968
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/2823.change.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Officially deprecated support for ``setup_requires``. Users are encouraged instead to migrate to PEP 518 ``build-system.requires`` in ``pyproject.toml``. Users reliant on ``setup_requires`` should consider pinning to this major version to avoid disruption.
3 changes: 3 additions & 0 deletions setuptools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ def finalize_options(self):
# Honor setup.cfg's options.
dist.parse_config_files(ignore_option_errors=True)
if dist.setup_requires:
raise SetuptoolsDeprecationWarning(
"setup_requires is deprecated. Supply build "
"dependencies using PEP 517 pyproject.toml build-requires.")
dist.fetch_build_eggs(dist.setup_requires)


Expand Down

0 comments on commit beb4968

Please sign in to comment.