Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAINT: Raise RuntimeError if setuptools version is too recent.
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 #20692.
- Loading branch information
eb6be7c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be sufficient to fail when vendored distutils is used? Setuptools 60+ supports using
SETUPTOOLS_USE_DISTUTILS=stdlib
to avoid this kind of issues without forcing the whole system to use buggy unmaintained setuptools versions.eb6be7c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How could we detect that?
eb6be7c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something alike:
eb6be7c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh. I was hoping for something that would check that distutils is actually the one from the stdlib.
eb6be7c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to check
__file__
or__module__
to find out if it is monkeypatched?