-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
check-manifest fails when setup.py uses setuptools_scm for versioning #68
Comments
I've no idea! check-manifest tries to prevent problems in various scenarios
Now considering your use case:
Why do you even need check-manifest? Is there any situation under which a package relying on setuptools_scm might produce an incomplete sdist? |
One scenario just occurred to me:
In this situation you (I'm using the general 'you' here, not you in specifically) don't need check-manifest to catch errors, but you'd like to prevent it aborting the process with false positives. It may be helpful to define a setup.cfg option to allow check-manifest to skip these projects, or perform a weaker test (just compare git metadata with sdist, in effect verifying that setuptools_scm works like it's supposed to -- and here I'm making assumptions about what setuptools_scm does, since I've nevert actually used it). Externally the user interface would be
This would skip the "copy to empty temporary directory without git metadata" part, in effect reverting to the behavior of check-manifest before bug #1 was fixed (with the corresponding disadvantages). Or -- thinking out loud here -- maybe I want to copy the VCS metadata too? |
Well, I'm using I'm used to using a
But I guess I should switch to explicitly excluding files that are part of the repo but shouldn't be part of the distribution. I'm not actually sure what role |
I'll leave it up to you @mgedmin, but I'd say this can be closed, except maybe you'd like to make a note that |
Ooh, that's a good reason to allow I'll see what I can do (if I can manage to find the time). |
I suggest the following fix:
I believe this is correct behavior because copying the sources to a directory with no version control and no PKG-INFO is a synthetic situation that check-manifest creates for testing, so it makes sense to shim setuptools_scm so that it will report the same answer that the user's working directory does. |
Ironically now I have a usecase for |
Workaround: |
See mgedmin/check-manifest#68 Check-manifest does not work when the package version is being retrieved from scm.
i just wanted to open a issue about it myself, mainly because i need it for setuptools_scm itself it should be noted that setuptools_scm automatically removes the need for a MANIFEST.in |
Does the workaround I suggested apply to your use case? Should check-manifest set the |
the suggested workaround does work, it may help to set it for the check, but it should print some notification that it had to it shoudl also be noted that setuptools_scm adds file finders and thus makes a manifest file typically irrelevant, however it cant self-consume due to bootstrap issues on travis´ |
I've released check-manifest 0.37 with this fix. |
fabulosu solution thanks |
check-manifest
copies the source files to a temporary directory, and then executespython2 setup.py sdist -d ...
from there, but since that is not the git working directory,setuptools_scm
can't find the git tag for versioning, resulting in:How can we use both
setuptools_scm
for versioning from our git tags, but also validate ourMANIFEST.in
withcheck-manifest
?The text was updated successfully, but these errors were encountered: