diff --git a/poetry/utils/setup_reader.py b/poetry/utils/setup_reader.py index 7056fe47c9b..6af89bc7981 100644 --- a/poetry/utils/setup_reader.py +++ b/poetry/utils/setup_reader.py @@ -183,6 +183,7 @@ def _find_setup_call( func = value.func if not (isinstance(func, ast.Name) and func.id == "setup") and not ( isinstance(func, ast.Attribute) + and hasattr(func.value, "id") and func.value.id == "setuptools" and func.attr == "setup" ):