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

check-manifest doesn't understand cases where VCS contents legitimately differ from sdist #58

Open
mgedmin opened this issue Nov 12, 2015 · 6 comments

Comments

@mgedmin
Copy link
Owner

mgedmin commented Nov 12, 2015

Sometimes you want to put generated files in the sdists, but you don't want to have them under version control. E.g. when you use Cython, you want to generate .c files and include them in sdists so your users don't have to have Cython installed to build your software -- all they'd need is a C compiler.

Currently check-manifest is ignorant of situations like these and warns about those generated files missing from VCS.

I think this is most likely a documentation bug:

  • figure out what's the right way to use check-manifest with a Cython-using package (e.g. put ignore = *.c in a setup.cfg?)
  • document it in the appropriate place
  • (maybe) have check-manifest suggest the ignore = *.c if it sees *.c or cython.dat in the "missing from VCS list
  • (maybe) include cython.dat in the default ignore list?

Some research is needed, e.g. what even is cython.dat and should it be present in sdists?

@tysonclugg
Copy link

-1

The point of an sdist is not to install stuff -- although you can because being able to build or install a package is a side-effect of having all the sources available. The point of an sdist is to distribute the source.

You should use wheel to produce installable distributions, since then you don't even need a C compiler to install them.

@mgedmin mgedmin changed the title check-manifest doesn't understand cases where VCS != sdist check-manifest doesn't understand cases where VCS contents legitimately differ from sdist Dec 16, 2015
@vegarsti
Copy link

vegarsti commented Sep 12, 2019

I also find this confusing. Is it possible to ignore this warning? At the moment, I'm not able to use it in a Jenkins pipeline because it returns the wrong exit code. But maybe I'm misunderstanding how to use it, that it's not meant for this use? How did you solve this @mgedmin?

@mgedmin
Copy link
Owner Author

mgedmin commented Sep 12, 2019

I don't have packages that distribute generated files ;)

Which is why this issue is staying open so long -- I don't have a test case, and other people are for some reason not opening pull requests.

@vegarsti do you have an open source githup repo you could point me at, that suffers from this problem?

@vegarsti
Copy link

@mgedmin Unfortunately not yet, need to tick a few boxes first. Will let you know! Thanks for being helpful!

@nixphix
Copy link

nixphix commented Sep 3, 2020

@mgedmin we have this situation in sklearn I'm trying to ignore some files that are in sdist but not in VCS check this github action log

And ignoring in setup.cfg is not ignoring the missing files in VCS

@mgedmin
Copy link
Owner Author

mgedmin commented Sep 3, 2020

nixphix/scikit-learn@bd3b368#diff-380c6a8ebbbce17d55d50ef17d3cf906R32 is not using the right syntax

[tool.check-manifest] is for pyproject.toml files; setup.cfg needs a simple [check-manifest] section.

Let me know if that resolves your problem!

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

4 participants