fix: the generated sdist file should contain everything needed to check and test the code, and to build the documentation as well by jenstroeger · Pull Request #967 · jenstroeger/python-package-template
Heads up, what happens here will currently depend on whether you run flit build directly, or make an sdist through a generic tool that calls flit as a backend, like python -m build. With flit build, it currently uses info from git to include all checked-in files, like tests and docs sources, similar to git archive, except for those listed in exclude. However, Flit as a backend to general tools starts from only the files you need for installation. From Flit 4.0 this will be the default mode for flit build as well, although you'll be able to specify --use-vcs to keep the old behaviour.
https://flit.pypa.io/en/stable/pyproject_toml.html#including-files-committed-in-git-hg
So you might want to explicitly list includes for things you do want in the sdist.
(I can get into how we ended up in this scenario if you want. But the short version is, I like git-archive style sdists, but I don't think the backend can assume the presence of git, and I don't want it to behave differently if git is present.)