Skip to content

Commit 2a41687

Browse files
committed
cmk-plugin-apis: include py.typed
With change, `py.typed` is included in the package built by `bazel`, i.e., ``` tar ft pkg_tar.tar | grep 'py.typed' ``` returns a file now. Change-Id: I01369bec4f7ce98a743e31b0798e60b5e4d9051d
1 parent 45af694 commit 2a41687

2 files changed

Lines changed: 19 additions & 3 deletions

File tree

packages/cmk-plugin-apis/BUILD

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ py_library(
3636
"cmk/agent_based/v2/clusterize.py",
3737
"cmk/agent_based/v2/render.py",
3838
],
39+
data = ["cmk/agent_based/py.typed"],
3940
imports = ["."],
4041
visibility = ["//visibility:public"],
4142
deps = [
@@ -55,6 +56,9 @@ py_library(
5556
"cmk/graphing/v1/perfometers.py",
5657
"cmk/graphing/v1/translations.py",
5758
],
59+
data = [
60+
"cmk/graphing/py.typed",
61+
],
5862
imports = ["."],
5963
visibility = ["//visibility:public"],
6064
)
@@ -75,6 +79,7 @@ py_library(
7579
"cmk/rulesets/v1/form_specs/validators.py",
7680
"cmk/rulesets/v1/rule_specs.py",
7781
],
82+
data = ["cmk/rulesets/py.typed"],
7883
imports = ["."],
7984
visibility = ["//visibility:public"],
8085
)
@@ -88,6 +93,7 @@ py_library(
8893
"cmk/server_side_calls/v1/_special_agents.py",
8994
"cmk/server_side_calls/v1/_utils.py",
9095
],
96+
data = ["cmk/server_side_calls/py.typed"],
9197
imports = ["."],
9298
visibility = ["//visibility:public"],
9399
deps = [
@@ -106,6 +112,7 @@ py_library(
106112
"cmk/inventory_ui/v1_alpha/_types.py",
107113
"cmk/inventory_ui/v1_alpha/_unit.py",
108114
],
115+
data = ["cmk/inventory_ui/py.typed"],
109116
imports = ["."],
110117
visibility = ["//visibility:public"],
111118
)
@@ -200,11 +207,23 @@ py_wheel(
200207
":agent_based",
201208
":graphing",
202209
":inventory_ui",
210+
":py_typed",
203211
":rulesets",
204212
":server_side_calls",
205213
],
206214
)
207215

216+
filegroup(
217+
name = "py_typed",
218+
srcs = [
219+
"cmk/agent_based/py.typed",
220+
"cmk/graphing/py.typed",
221+
"cmk/inventory_ui/py.typed",
222+
"cmk/rulesets/py.typed",
223+
"cmk/server_side_calls/py.typed",
224+
],
225+
)
226+
208227
package_wheel(
209228
name = "pkg_tar",
210229
visibility = ["//visibility:public"],

packages/cmk-plugin-apis/pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,4 @@ build-backend = "setuptools.build_meta"
1010
[tool.setuptools.dynamic]
1111
dependencies = { file = ["requirements.txt"] }
1212

13-
[tool.setuptools.package-data]
14-
"cmk.agent_based" = ["py.typed"]
15-
1613
[tool.bandit]

0 commit comments

Comments
 (0)