-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix sdist file inclusion to just pack the Git-tracked files #3324
Fix sdist file inclusion to just pack the Git-tracked files #3324
Conversation
This is necessary because `setuptools-scm` that is currently integrated, already includes all of the Git-tracked files to sdist. This means that only a single exclusion is needed for huge image blobs present in the Git tree now.
This is required because it tries to analyze `MANIFEST.in` without understanding the context of the current packaging setup. It does not even look into the actual sdist either. Because of this, it makes incorrect assumptions, makes false claims (like that some files are not included when in fact they are — via the `setuptool-scm` integration hook). It also produces harmful recommendations that mess up what's actually included and excluded if they are being followed without understanding the context.
Backport to stable/3.4: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply 461cbd3 on top of patchback/backports/stable/3.4/461cbd3e8f84b25e9da5d6a60e8ab94b41ca7b08/pr-3324 Backporting merged PR #3324 into main
🤖 @patchback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I manually checked the output and it looks mostly ok. The only regression that I did spot was that it started to include .github
and .zuul.d
folders and I see no use for these in sdist.
This is not a regression but an intended outcome as proven by the linked discussions and linked explanations. Did you read my comments? |
+1 |
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