Skip to content
Merged
Changes from 2 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
13 changes: 11 additions & 2 deletions python/runfiles/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,19 @@ filegroup(
visibility = ["//python:__pkg__"],
)

filegroup(
name = "py_typed",
# See PEP 561: py.typed is a special file that indicates the code supports type checking
srcs = ["py.typed"],
)

py_library(
name = "runfiles",
srcs = [
"__init__.py",
"runfiles.py",
],
data = ["py.typed"],
data = [":py_typed"],
imports = [
# Add the repo root so `import python.runfiles.runfiles` works. This makes it agnostic
# to the --experimental_python_import_all_repositories setting.
Expand Down Expand Up @@ -57,5 +63,8 @@ py_wheel(
# this can be replaced by building with --stamp --embed_label=1.2.3
version = "{BUILD_EMBED_LABEL}",
visibility = ["//visibility:public"],
deps = [":runfiles"],
deps = [
":py_typed",
":runfiles",
],
)