Skip to content

feat: Package pyi files in wheel #2609

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

Merged
merged 7 commits into from
Mar 6, 2025

Conversation

Synss
Copy link
Contributor

@Synss Synss commented Feb 13, 2025

1.1.0 introduced separate attributes for the type definitions (.pyi files) and type checking. This patch adds those files to the wheel to ensure that they are distributed and available to users.

#2538 introduced pyi_srcs.

Copy link
Collaborator

@aignas aignas left a comment

Choose a reason for hiding this comment

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

Could you please add a test to examples/wheel folder showing that the files get packaged?

Verified

This commit was signed with the committer’s verified signature.
RobinMalfait Robin Malfait
1.1.0 introduced separate attributes for the type definitions (`.pyi`
files)  and type checking.  This patch adds those files to the wheel
to ensure that they are distributed and available to users.

Verified

This commit was signed with the committer’s verified signature.
RobinMalfait Robin Malfait
1.1.0 introduced separate attributes for the type definitions (`.pyi`
files) and type checking.  This patch adds those files to the package
produced by `py_package` and updates the wheel examples.
@Synss Synss force-pushed the package-pyi-in-py_wheel branch from 5fa7a3f to 70a5a65 Compare February 26, 2025 14:59
@Synss
Copy link
Contributor Author

Synss commented Feb 26, 2025

Could you please add a test to examples/wheel folder showing that the files get packaged?

Done. I also had to propagate the .pyi files in py_package to keep a consistent behavior.

Copy link
Collaborator

@aignas aignas left a comment

Choose a reason for hiding this comment

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

In general LGTM, thank you for the added tests. Only minor nits to address before merging.

Thank you for your contribution.

Verified

This commit was signed with the committer’s verified signature.
RobinMalfait Robin Malfait
Copy link
Collaborator

@aignas aignas left a comment

Choose a reason for hiding this comment

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

Thank you

Verified

This commit was signed with the committer’s verified signature.
RobinMalfait Robin Malfait
@aignas
Copy link
Collaborator

aignas commented Mar 3, 2025

Could you please fix the failing tests?

Synss added 2 commits March 4, 2025 06:11
Checksums became out of sync.
@Synss
Copy link
Contributor Author

Synss commented Mar 5, 2025

Done in f3ce381 if I didn't overlook anything this time.

Copy link
Collaborator

@aignas aignas left a comment

Choose a reason for hiding this comment

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

Thank you!

@aignas aignas added this pull request to the merge queue Mar 6, 2025
Merged via the queue into bazel-contrib:main with commit a816962 Mar 6, 2025
4 checks passed
@Synss Synss deleted the package-pyi-in-py_wheel branch March 6, 2025 06:00
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.

None yet

2 participants