Skip to content

chore: Package py.typed files with the built distribution #543

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

msto
Copy link
Contributor

@msto msto commented Apr 25, 2025

Summary

Third time's the charm. 😅

The py.typed files were missing from the built distribution because the pyproject.toml was configured to include only .py source files. I've updated the configuration to also include py.typed, so these files will now be part of the distribution and available in pypi installs.

Thank you for the patience and thanks for including this!

Changed

  • Updated pyproject.toml so py.typed files in the src/ package directories are included in the built distribution.

Notes

I confirmed that the tarball built with uv build includes the py.typed files after this change to the pyproject.toml, and that no other files are added or removed.

$ tar -t -f dist/latch-2.61.1.tar.gz | grep py.typed
latch-2.61.1/src/latch/py.typed
latch-2.61.1/src/latch_cli/py.typed
latch-2.61.1/src/latch_sdk_config/py.typed
latch-2.61.1/src/latch_sdk_gql/py.typed
$ uv build && tar -t -f dist/latch-2.61.1.tar.gz > old_build.txt
$ <modify pyproject.toml>
$ uv build && tar -t -f dist/latch-2.61.1.tar.gz > new_build.txt

$ diff old_build.txt new_build.txt
3a4
> latch-2.61.1/src/latch/py.typed
70a72
> latch-2.61.1/src/latch_cli/py.typed
173a176
> latch-2.61.1/src/latch_sdk_config/py.typed
176a180
> latch-2.61.1/src/latch_sdk_gql/py.typed

new_build.txt
old_build.txt

@msto msto requested a review from ayushkamat as a code owner April 25, 2025 14:27
@msto
Copy link
Contributor Author

msto commented Apr 25, 2025

Related to #541 and #517

@msto msto changed the title fix: Package py.typed files with the built distribution chore: Package py.typed files with the built distribution Apr 25, 2025
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.

1 participant