Skip to content

Include more details on failure to import setuptools in metadata resolution #13290

@jakelishman

Description

@jakelishman

What's the problem this feature will solve?

When building legacy packages in non-PEP-517 mode, if setuptools fails to import for any reason, the error message is "setuptools is not installed in the build environment". However, setuptools might be installed, but failed to import for other reasons, but it's hard to track down why with the particular error.

Describe the solution you'd like

Include the traceback of the triggering exception in the error message.

Alternative Solutions

Nothing much, I guess?

Additional context

For some discussion of a seemingly valid environment that can cause setuptools to fail to import, see (e.g.) pypa/setuptools#4894.

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions