-
-
Notifications
You must be signed in to change notification settings - Fork 425
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
Wheels built using the new pyproject file don't include .lark files #1307
Comments
Hi, I am unable to reproduce this issue. When I run Maybe you can provide with more details? Do you have an idea for why your built packages are different than the official package? |
I tried doing the same in a Debian bookworm container, got the same results - the resulting wheel doesn't have .lark files; you can try the following Dockerfile (i suppose it looks better than a one-liner): FROM debian:bookworm
RUN apt update
RUN apt install -y python3-build python3-setuptools git unzip
RUN git clone -b 1.1.7 https://github.com/lark-parser/lark
WORKDIR /lark
RUN python3 -m build --wheel --no-isolation
RUN unzip -l ./dist/lark-1.1.7-py3-none-any.whl |
To be fair, I'm not sure why it does work for you - the The only thing that comes to mind is setuptools changing something between 61.2.0 ( the minimum version specified in pyproject ) and latest, 68.0.0 |
Your guess might be true. The section that's responsible for the grammar files is this one: [tool.setuptools]
packages = [
"lark",
"lark.parsers",
"lark.tools",
"lark.grammars",
"lark.__pyinstaller",
]
include-package-data = true We're including However, when I run _BetaConfiguration: Support for `[tool.setuptools]` in `pyproject.toml` is still *beta*. So it's very possible that we need to require a later version of setuptools. |
Ah, no, it's not the version of setuptools, i just tested building it with setuptools 61.2.0: FROM debian:bookworm
RUN apt update
RUN apt install -y python3-venv git unzip
RUN git clone -b 1.1.7 https://github.com/lark-parser/lark
WORKDIR /lark
RUN python3 -m venv venv
RUN venv/bin/python3 -m pip install build setuptools==61.2.0
RUN venv/bin/python3 -m build --wheel
RUN unzip -l ./dist/lark-1.1.7-py3-none-any.whl rather, it might be this:
from: https://setuptools.pypa.io/en/latest/userguide/datafiles.html |
Sorry, I'm not following. Can you explain more? |
if you have note that doesn't require even having the git repo- you can regardless, they are indeed missing from the manifest (or wherever they are meant to be specified, per that datafiles article) |
well, even removing scm later still actually works, it only doesn't work the first time.. some yet-additional weird caching takes place :D if you build from a completely fresh environment (start a container, just clone the repo, run build, like the dockerfile example), you should be able to reproduce it. but the fix is as simple as including the files in package-data where they should be anyway. |
Got it. Would you like to submit a PR? |
Describe the bug
When building lark 1.1.6 or later using a pep517-compatible tool, the resulting wheel does not include the
.lark
files inlark/grammars/
To Reproduce
Build the package with, for example, build; then, install the resulting package and check
lark/grammars/
( or try using something that depends oncommon.lark
)Simple Docker reproduction example:
The text was updated successfully, but these errors were encountered: