Fix sdist file inclusion to just pack the Git-tracked files #3324
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current setup mixes up incompatible technologies —
setuptools-scm
andcheck-manifest
. The former uses a setuptools hook to auto-include all the Git-tracked files but following the recommendations from the latter adds extra non-tracked rubbish from various build processes on top.Some big blobs inflate the sdist too much. Strictly speaking, they shouldn't even be in Git but it is what it is. I've originally fixed this about 2.5 years ago by adding a single exclusion via #1924.
Later on, that setup has been broken by #2943 at which point it allowed random build artifacts to slip through the misconfiguration.
This change does not attempt to exclude small text files because they do not affect the size of the sdist too much (less than 1KB). Adding extra entries introduces undesired maintenance burden and is therefore not a commonly accepted practice when it comes to setuptools-scm managed projects. The considerations are explained in #3314 (comment) and pypa/setuptools-scm#190 (comment).
See the commit messages for more specific details.
Supersedes #3314.
PR Type