File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,9 @@ END_UNRELEASED_TEMPLATE
6969* (pypi) Wheels with BUILD.bazel (or other special Bazel files) no longer
7070 result in missing files at runtime
7171 ([ #2782 ] ( https://github.com/bazel-contrib/rules_python/issues/2782 ) ).
72+ * (runfiles) The pypi runfiles package now includes ` py.typed ` to indicate it
73+ supports type checking
74+ ([ #2503 ] ( https://github.com/bazel-contrib/rules_python/issues/2503 ) ).
7275* (toolchains) ` local_runtime_repo ` now checks if the include directory exists
7376 before attempting to watch it, fixing issues on macOS with system Python
7477 ({gh-issue}` 3043 ` ).
Original file line number Diff line number Diff line change @@ -22,13 +22,19 @@ filegroup(
2222 visibility = ["//python:__pkg__" ],
2323)
2424
25+ filegroup (
26+ name = "py_typed" ,
27+ # See PEP 561: py.typed is a special file that indicates the code supports type checking
28+ srcs = ["py.typed" ],
29+ )
30+
2531py_library (
2632 name = "runfiles" ,
2733 srcs = [
2834 "__init__.py" ,
2935 "runfiles.py" ,
3036 ],
31- data = ["py.typed " ],
37+ data = [":py_typed " ],
3238 imports = [
3339 # Add the repo root so `import python.runfiles.runfiles` works. This makes it agnostic
3440 # to the --experimental_python_import_all_repositories setting.
@@ -57,5 +63,8 @@ py_wheel(
5763 # this can be replaced by building with --stamp --embed_label=1.2.3
5864 version = "{BUILD_EMBED_LABEL}" ,
5965 visibility = ["//visibility:public" ],
60- deps = [":runfiles" ],
66+ deps = [
67+ ":py_typed" ,
68+ ":runfiles" ,
69+ ],
6170)
You can’t perform that action at this time.
0 commit comments