8000 fix(pypi): include pyi files in data attribute by rickeylev · Pull Request #2558 · bazel-contrib/rules_python · GitHub
[go: up one dir, main page]

Skip to content

fix(pypi): include pyi files in data attribute #2558

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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ Unreleased changes template.
`python_version` attribute is still used to specify the Python version.
* (pypi) Updated versions of packages: `pip` to 24.3.1 and
`packaging` to 24.2.
* (pypi) For pypi-generated targets, `*.pyi` files are included in the
`pyi_srcs` attribute instead of the `data` attribute.

{#v1-1-0-deprecations}
#### Deprecations
Expand Down
4 changes: 3 additions & 1 deletion python/private/pypi/whl_library_targets.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,13 @@ def whl_library_targets(
)

if hasattr(rules, "py_library"):
# NOTE: pyi files should probably be excluded because they're carried
# by the pyi_srcs attribute. However, historical behavior included
# them in data and some tools currently rely on that.
_data_exclude = [
"**/*.py",
"**/*.pyc",
"**/*.pyc.*", # During pyc creation, temp files named *.pyc.NNNN are created
"**/*.pyi",
# RECORD is known to contain sha256 checksums of files which might include the checksums
# of generated files produced when wheels are installed. The file is ignored to avoid
# Bazel caching issues.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ def _test_whl_and_library_deps(env):
"**/*.py",
"**/*.pyc",
"**/*.pyc.*",
"**/*.pyi",
"**/*.dist-info/RECORD",
] + glob_excludes.version_dependent_exclusions(),
),
Expand Down Expand Up @@ -325,7 +324,6 @@ def _test_group(env):
"**/*.py",
"**/*.pyc",
"**/*.pyc.*",
"**/*.pyi",
"**/*.dist-info/RECORD",
] + glob_excludes.version_dependent_exclusions(),
),
Expand Down
0