If I don’t specify sdist.include, the source distribution includes only the default files and directories, and it correctly respects the .gitignore file.
However, once I override sdist.include, the source distribution ends up including everything in the project directory — even files and folders that should normally be excluded.
Even when I set sdist.include = ["csrc"], the resulting source distribution still contains all files and directories from the current working directory where I run python -m build --sdist
If I don’t specify sdist.include, the source distribution includes only the default files and directories, and it correctly respects the
.gitignorefile.However, once I override
sdist.include, the source distribution ends up including everything in the project directory — even files and folders that should normally be excluded.Even when I set
sdist.include = ["csrc"], the resulting source distribution still contains all files and directories from the current working directory where I runpython -m build --sdist