Skip to content

Commit

Permalink
MAINT: Raise RuntimeError if setuptools version is too recent.
Browse files Browse the repository at this point in the history
NumPy does not build with setuptools versions greater than '60.0.0'.
Check the version when setuptools is imported in setup.py and raise
a RuntimeError if the version is too recent. That way we avoid people
opening issues when their build fails for that reason.

Closes numpy#20692.
  • Loading branch information
charris committed Jan 11, 2022
1 parent 8f87be6 commit eb6be7c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
# so that it is in sys.modules
import numpy.distutils.command.sdist
import setuptools
if int(setuptools.__version__.split('.')[0]) >= 60:
raise RuntimeError(
"Setuptools version is '{}', version < '60.0.0' is required. "
"See pyproject.toml".format(setuptools.__version__))

# Initialize cmdclass from versioneer
from numpy.distutils.core import numpy_cmdclass
Expand Down

0 comments on commit eb6be7c

Please sign in to comment.