-
-
Notifications
You must be signed in to change notification settings - Fork 423
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
Include .lark files in package data #1308
Conversation
In comparison to the old Line 20 in 7d9cfa6
|
@MegaIng I don't know. It looks okay in my builds, but apparently I can't rely on that. |
If we want them to be included, they need to be added, even if just for documentation. |
Readme.md is already mentioned by name, and docs/* should take care of the rest. Also, right now we don't include examples/README.rst, or any of the examples subfolders. |
Are we looking at the same file? I don't see either of those included |
They are in MANIFEST.in P.S. maybe we can just require setuptools-scm, and then we won't have to maintain MANIFEST.in as often. |
Aha right. I don't have experience with But if we are using |
[tool.setuptools.packages.find]
include = ["lark", "lark.*"] |
|
My preference is to use hatchling. :) That includes everything that is not gitignored by default, and can be configured easily in pyproject.toml without a separate MANIFEST.in file. It's also simpler and faster than setuptools. For setuptools, package-data and MANIFEST.in are not interchangeable. You place things that go into the SDist into MANIFEST.in. You place things that go into the wheel in package-data. For simplicity, it will also be added to your MANIFEST if it's in package-data (since you need it in the SDist to get it in the wheel), but the question is, does it go in the wheel? If so, then use package-data. Otherwise use MANIFEST.in or setuptools_scm. Not a huge fan of setuptools_scm's file finder. You can't turn it off if it's installed, so it affects every other package, even if they have no idea it exists. This doesn't affect isolated builds, of course, but it does affect systems like Spack where there's only one build environment. However, it's a very minor worry, and I do use setuptools_scm for versioning lots of places, which technically installs the file finder too (at least for now). |
Thanks everyone for weighing in. It was helpful. It sounds like this change is correct and improves Lark, so I will merge this PR. I think all of the suggestions you raised have merit, and will be more convenient. Hatchling sounds great, at least in theory. I would be happy to get rid of MANIFEST.in. But it also sounds like more work, and another risk of breaking people's builds. Same goes for setuptools_scm, and this whole issue started because of its odd behavior. But, it might turn out to be an easy win. Or we can leave things as they are, i.e. hopefully working but a little clumsy. I don't know which choice is the right one, so if you feel strongly about it, you can open a new PR. If it makes our configuration shorter and easier to manage, I'll be happy to accept it. |
Fixes #1307