I realized this didn’t come across as I intended—it wasn’t meant to be a recommendation against shipping sdists on PyPI, but rather that ideally users consume wheels, while still providing sdists. In fact, several of my later points rely on the latter when I’m explaining why the project configuration format package authors use is still important, because it is still completely relevant when users install from sdists. In particular,
While you should always still ship a sdist just in case
Yes, you should always generate and upload both sdists and wheels
[sdists] are a useful fallback for platforms that your wheels don’t support and users who want to build from source.
At minimum, you need to specify
[build-system]
inpyproject.toml
so the tools you, other developers and users consuming sdists use to build, package and install your package know how to do so.
But I definitely realize how that other line could be interpreted to imply that you shouldn’t ship sdists, which was not what I meant. I’ll update it.
There is often resistance when people request that
tests be included in sdists.
Coming from a package author/upstream perspective, I don’t have a problem with doing so, but what I’ve had a hard time understanding is why downstreams don’t just use the source tarballs, as they are the definitive source form of the project, whereas the sdist is nominally for user consumption. I can see why that is the case for special cases like @pf_moore where very restrictive corporate policies are in place, but not for Linux distro downstreams or other open source projects I have more inclination to spend my volunteer time supporting.