Skip to content
Snippets Groups Projects
Commit 4682bf39 authored by Masood Malekghassemi's avatar Masood Malekghassemi
Browse files

Diagnose AttrErr as too-old setuptools

parent 5e43db8d
No related branches found
No related tags found
No related merge requests found
......@@ -100,9 +100,15 @@ def diagnose_compile_error(build_ext, error):
.format(source)
)
def diagnose_attribute_error(build_ext, error):
if any('_needs_stub' in arg for arg in error.args):
raise commands.CommandError(
"We expect a missing `_needs_stub` attribute from older versions of "
"setuptools. Consider upgrading setuptools.")
_ERROR_DIAGNOSES = {
errors.CompileError: diagnose_compile_error
errors.CompileError: diagnose_compile_error,
AttributeError: diagnose_attribute_error
}
def diagnose_build_ext_error(build_ext, error, formatted):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment