Just the other day I saw a case of an sdist that seemed to be broken along those lines. As I understood it, the build backend was expecting to use a version from a file that cached a setuptools-scm result, but the sdist tarball didn’t actually appear to contain the file.
I would say the metadata is wrong, and further that the tooling is working wrongly. In my view, because pyproject.toml
is included in an sdist, it’s about explaining how a wheel is produced from an sdist. If there’s something interesting about producing an sdist from the repo, then that should be handled separately - and it’s fine if that produces an sdist containing a pyproject.toml
that differs from the repo’s pyproject.toml
, as long as the packaged version correctly describes the sdist and allows for building a correct wheel.