Record the top-level names of a wheel in `METADATA`?

Came here from Script to get top-level packages from source tree - #5 by pradyunsg, I have been looking for an easy way to do this for some time.

Seems like there’s agreement around this being useful and desirable, having it in the Provides field in METADATA, and the need of writing a PEP to at least un-deprecate Provides.

Most people only care about top-level imports (so do I), so we could start with it (adding subpackages later is backwards compatible?)

There seems to be still some uncertainty around (1) how to handle namespace packages and (2) whether this should be manually entered in pyproject.toml or only written by backends.

I’d love to have it in pyproject.toml (essentially a standard version of setuptools packages feature) but I also see how it gets in the way of how certain backends infer the packages.

Am I missing something? Shall we focus for now on clarifying the semantics around namespace packages and let backends write whatever they inferred to METADATA.Provides for now (hence codifying the current behavior, and deferring the pyproject.toml question for a later stage)?

1 Like