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

Add py.typed to package_data of lark package #1109

Merged
merged 1 commit into from
Feb 8, 2022
Merged

Add py.typed to package_data of lark package #1109

merged 1 commit into from
Feb 8, 2022

Conversation

hf-kklein
Copy link
Contributor

@hf-kklein hf-kklein commented Feb 8, 2022

Based on #1106 (comment)
Fixes #1105

(py39) python setup.py build
running build
running build_py
package init file 'lark\grammars\__init__.py' not found (or not a regular file)
copying lark\py.typed -> build\lib\lark

@hf-kklein
Copy link
Contributor Author

hf-kklein commented Feb 8, 2022

obsoletes #1106
alternative to #1108

@erezsh erezsh requested a review from MegaIng February 8, 2022 19:49
Copy link
Member

@erezsh erezsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks right.

Did you test it?

@hf-kklein
Copy link
Contributor Author

Did you test it?

Not up to my own library ;) But in the build/lib/lark directory the file is now included. At least it won't do any harm.

@hf-kklein
Copy link
Contributor Author

I could give it a try when using a pip dev-install of lark instead of the published 1.1.0 in the library where the problem occured in #1105.

@erezsh
Copy link
Member

erezsh commented Feb 8, 2022

If you see the file in a fresh build, that's probably proof enough.

@hf-kklein
Copy link
Contributor Author

I just verified it:

  • checked out Hochfrequenz/ahbicht/lark-1.1.0
  • ran mypy src/ahbicht (or tox -re type_check) => fail
  • used pip install -q -e ../lark to install this lark branch
  • used mypy src/ahbicht again => success

@erezsh
Copy link
Member

erezsh commented Feb 8, 2022

Good enough for me.

@erezsh erezsh merged commit e965da6 into lark-parser:master Feb 8, 2022
@hf-kklein hf-kklein deleted the py_typed_setuppy branch February 8, 2022 20:40
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

Successfully merging this pull request may close these issues.

Lark 1.1.0 does not provide a py.typed file
2 participants