If you want to manipulate which files are put in the .tar.gz, you need to create a MANIFEST.in file and configure it as so:
prune .gitignore
prune .github
Then run this to build:
python pyproject.toml sdist
Examine the tar created under /dist