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

Relax the *.mo check #38

Open
mgedmin opened this issue Dec 23, 2014 · 5 comments
Open

Relax the *.mo check #38

mgedmin opened this issue Dec 23, 2014 · 5 comments

Comments

@mgedmin
Copy link
Owner

mgedmin commented Dec 23, 2014

Some Zope packages have .mo files in their test directories. Those are fine to include in the sdist.

Currently check-manifest tells you they shouldn't be in the VCS (which is wrong, for that particular use case), and it doesn't warn you if they're not included in the sdist (which is also wrong).

@mgedmin
Copy link
Owner Author

mgedmin commented Dec 23, 2014

This is complicated: we may want *.mo (created during setup.py sdist) to be in the sdist but not in the VCS, and we shouldn't warn about that.

@tysonclugg
Copy link

-1

Once again, why put generated files in your sdist? That's what bdist_wheel is for.

@mgedmin
Copy link
Owner Author

mgedmin commented Nov 25, 2015

In this particular example the .mo files aren't generated -- they're test data for the .mo parser shipped in the package.

@mauritsvanrees
Copy link
Contributor

@tysonclugg An sdist is a perfectly fine way of distributing packages. Wheels are nice, but for example not yet usable with buildout (sadly). When creating a distribution that has .po files in VCS, I want to distribute generated .mo files too. I use https://pypi.python.org/pypi/zest.pocompile for that. That works for both sdists and wheels btw.

Yes, it is called a 'source distribution', but that does not mean only version controlled files should end up there. For me a source distribution is simply a non-binary distribution. I might be stretching the definition of non-binary by including binary .mo files... Anyway, I don't wish to argue here, which I am doing a bad job of. I just want you to know that there are people who happily include generated files in their sdists and who very much like check-manifest to check the result.
I'll grant that strictly speaking you are correct that wheels are more meant for this. But for me here practicality beats purity.

@mauritsvanrees
Copy link
Contributor

@mgedmin Maybe ignore-default-rules = true in setup.cfg helps here? Well, to fit all use cases, I guess more options could be used:

  • Files that are in VCS but must not be in the dist: current ignore option.
  • Files that are in VCS and must be in the dist: that is simply what the MANIFEST.in is for, plus the standard Python rules.
  • Files that are not in VCS but must be in the dist: maybe a new expected option.
  • Files that are not in VCS and must not be in the dist: hm, that is what the ignore, global-ignore and prune options in MANIFEST.in are for.

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

No branches or pull requests

3 participants