Skip to content

Commit 2d0a0cd

Browse files
committed
cmk-crypto: include py.typed in whl package
With change, `py.typed` is included in the package built by `bazel`, i.e., ``` tar ft bazel-bin/packages/cmk-crypto/pkg_tar.tar | grep 'py.typed' ``` returns a file now. Change-Id: Ibdb5c14aaf1df42dc95c25d701d2c5fde26de2c7
1 parent 5b79dcf commit 2d0a0cd

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

packages/cmk-crypto/BUILD

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ py_library(
2525
"cmk/crypto/totp.py",
2626
"cmk/crypto/x509.py",
2727
],
28+
data = [":py_typed"],
2829
imports = ["."],
2930
visibility = ["//cmk:__pkg__"],
3031
deps = [
@@ -71,7 +72,15 @@ py_wheel(
7172
strip_path_prefixes = ["packages/cmk-crypto"],
7273
# TODO: Duplicated from pyproject.toml
7374
version = "1.1.0",
74-
deps = [":cmk-crypto"],
75+
deps = [
76+
":cmk-crypto",
77+
":py_typed",
78+
],
79+
)
80+
81+
filegroup(
82+
name = "py_typed",
83+
srcs = ["cmk/crypto/py.typed"],
7584
)
7685

7786
package_wheel(

packages/cmk-crypto/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.crypto" = ["py.typed"]
15-
1613
[tool.bandit]

0 commit comments

Comments
 (0)