Do we want to keep the `[build-system]` default for `pyproject.toml`?

I think this is a good idea – but I think the opt-in should be via “is there build-related infromation?” instead. In particular, I do think it’s reasonable to allow build frontends to have flexibility on the behaviour here to provide a better user experience.

Even more specificially, I think what we should try to enable is allowing a build frontend to refuse to build if a [project] table or [build-system] table does not exist (and a pyproject.toml does). uv prints a warning for this case today and I’d be personally happy for pip to make this an error as well.

IIUC, that would be sufficient to allow installers to provide the appropriate user experience here - which IMO is an error with guidance on how to add proper metadata.

(yes, I’ve changed my position on where this UX fix should live)

Update: I’ve filed Allow errors for missing `[build-system]` table with no metadata by pradyunsg · Pull Request #1944 · pypa/packaging.python.org · GitHub as a specification update, to permit this.

4 Likes