blob: 0e0423a1491032fe93aa39437c1d08f85318ba65 [file] [log] [blame]
load("@rules_python//python:defs.bzl", "py_binary")
load("@pip_deps//:requirements.bzl", "requirement")
package(default_visibility = ["//visibility:private"])
licenses(["notice"])
exports_files(["aead_test_keyset.json"])
py_binary(
name = "aead_cli",
srcs = ["aead_cli.py"],
python_version = "PY3",
deps = [
requirement("absl-py"),
"@tink_py//tink:secret_key_access",
"@tink_py//tink:tink_python",
"@tink_py//tink/aead",
],
)
py_library(
name = "aead_basic",
srcs = ["aead_basic.py"],
deps = [
"@tink_py//tink:secret_key_access",
"@tink_py//tink:tink_python",
"@tink_py//tink/aead",
],
)
py_test(
name = "aead_basic_test",
srcs = ["aead_basic_test.py"],
python_version = "PY3",
deps = [
requirement("absl-py"),
":aead_basic",
],
)
sh_test(
name = "aead_test",
size = "small",
srcs = ["aead_cli_test.sh"],
args = [
"$(rootpath :aead_cli)",
"$(rootpath :aead_test_keyset.json)",
],
data = [
":aead_cli",
":aead_test_keyset.json",
],
)
# This runs the previous test assuming the Tink python package has been
# installed previously with pip3 install.
sh_test(
name = "aead_test_package",
size = "small",
srcs = ["aead_cli_test.sh"],
args = [
"'python3 $(rootpath :aead_cli.py)'",
"$(rootpath :aead_test_keyset.json)",
],
data = [
":aead_cli.py",
":aead_test_keyset.json",
],
)