Skip to content
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

Complains about auto-generated *.mo files from zest.pocompile or Plone #2

Closed
mauritsvanrees opened this issue Mar 6, 2013 · 5 comments

Comments

@mauritsvanrees
Copy link
Contributor

Useful package, thanks.

When I try it with a git clone of https://github.com/collective/Products.Poi I get some complaints:

$ check-manifest 
listing source files under version control: 184 files and directories
building an sdist: Products.Poi-2.2.1.dev0.tar.gz: 214 files and directories
files in version control do not match the sdist!
missing from VCS:
  .installed.cfg
  .mr.developer.cfg
  Products/Poi/locales/ca/LC_MESSAGES/Poi.mo
  Products/Poi/locales/ca/LC_MESSAGES/plone.mo
  Products/Poi/locales/cs/LC_MESSAGES/Poi.mo
  Products/Poi/locales/cs/LC_MESSAGES/plone.mo
  ...(etc)...

The .installed.cfg and .mr.developer.cfg files are in the .gitignore file. Ah, I should change my MANIFEST.in to not include them. I had the expectation that include * would not include dot files, but that is wrong. Also, that is beside the point for this issue. :-)

But I have zest.pocompile installed, which compiles .po files into .mo files during the release. Plone also generates these files on startup if you have configured your buildout.cfg correctly. So these .mo files are usually there and they should be in the release, but they should not be in VCS. So check-manifest should not complain about them.

Can anything be done about that? Possibly check-manifest could look at the missing files and ignore any that are ignored by the VCS. Note that in my case *.mo is not in the .gitignore of this package, but in the general .gitignore in my home directory. I do not mind adding it to the .gitignore of the package, but currently that does not help.

@mgedmin
Copy link
Owner

mgedmin commented Mar 6, 2013

There are two cases here:

  • files that are ignored in .gitignore are accidentally included in your sdist (e.g. .installed.cfg)
  • files that are ignored in .gitignore are intentionally included in your sdist (e.g. *.mo)

check-manifest ought to warn about the first kind, but not about the second kind.

I don't think there's enough existing information to distinguish these cases (as you've seen, it's easy to include too much if you use wildcards), so I propose to make check-manifest configurable. Say, in setup.cfg:

[check-manifest]
ignore = *.mo

Now, is one option enough, or should there be separate options for the two kinds of false positives (missing in VCS versus missing in sdist)? I'd like to be as explicit as possible and go with two separate options, but I'm having trouble coming up with short but clear option names.

@mgedmin
Copy link
Owner

mgedmin commented Mar 6, 2013

I just noticed that I already have a hard-coded IGNORE = [...] list for things like *.egg-info and setup.cfg. It shouldn't be too hard to extend the filtering to support patterns and only slightly harder to make it configurable.

Would a hardcoded *.mo ignore pattern make sense? People shouldn't commit these into the VCS ever, right?

@mgedmin
Copy link
Owner

mgedmin commented Mar 6, 2013

check-manifest 0.9 will be silent if it sees *.mo in sdists, but will complain if it sees *.mo in the VCS.

@mgedmin
Copy link
Owner

mgedmin commented Mar 6, 2013

0.9 is out.

@mgedmin mgedmin closed this as completed Mar 6, 2013
@mauritsvanrees
Copy link
Contributor Author

Seems good this way. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants