You can specify exactly which files to include
and exclude
in your distribution, e.g. for the Source distribution:
pyproject.toml
1 2 3 4 5 6 7 8 9
[tool.hatch.build.targets.sdist] include = [ "src/arrow_to_knee/*.py", "/tests", ] exclude = [ "*.json", "src/arrow_to_knee/some-random-file.py", ]
The exclude
takes precedence, and /
refers to the project root.
You can use exactly the same configuration for your Binary distribution.
Better to specify as little as possible.