It turns out that all submodules need to be listed in pyproject.toml, otherwise installing from pypi results in broken imports and missing submodules. I tried to get automatic discovery working but it seems glitchy, I can't seem to avoid including tests, docs, etc. even though the setuputils docs say these should automatically be ignored. Rather than start manually ignoring things, I went with manually specifying what to include.
It turns out that all submodules need to be listed in pyproject.toml, otherwise installing from pypi results in broken imports and missing submodules. I tried to get automatic discovery working but it seems glitchy, I can't seem to avoid including tests, docs, etc. even though the setuputils docs say these should automatically be ignored. Rather than start manually ignoring things, I went with manually specifying what to include.