-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathBUILD
More file actions
64 lines (60 loc) · 1.89 KB
/
Copy pathBUILD
File metadata and controls
64 lines (60 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
load("@pybind11_bazel//:build_defs.bzl", "pybind_extension")
load("@rules_python//python:py_library.bzl", "py_library")
load("@rules_python//python:py_test.bzl", "py_test")
package(default_visibility = ["//visibility:private"])
pybind_extension(
name = "sample_cel_ext_cc",
srcs = ["sample_cel_ext.cc"],
data = [
"sample_cel_ext_cc.pyi",
":sample_cel_ext_py",
"//cel_expr_python:cel",
],
deps = [
"//cel_expr_python:cel_extension",
"//cel_expr_python:status_macros",
"@com_google_absl//absl/base:nullability",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_cel_cpp//checker:type_checker_builder",
"@com_google_cel_cpp//common:decl",
"@com_google_cel_cpp//common:type",
"@com_google_cel_cpp//common:value",
"@com_google_cel_cpp//compiler",
"@com_google_cel_cpp//runtime:function_adapter",
"@com_google_cel_cpp//runtime:runtime_builder",
"@com_google_cel_cpp//runtime:runtime_options",
"@com_google_protobuf//:protobuf",
],
)
py_library(
name = "sample_cel_ext_py",
srcs = ["sample_cel_ext.py"],
data = [
"//cel_expr_python:cel",
],
deps = select({
"@platforms//os:windows": [],
"//conditions:default": ["//cel_expr_python:cel"],
}),
)
py_test(
name = "custom_ext_test",
srcs = ["custom_ext_test.py"],
data = [
":sample_cel_ext_cc",
"//cel_expr_python:cel",
],
deps = [
":sample_cel_ext_py",
"@com_google_absl_py//absl/testing:absltest",
"@com_google_absl_py//absl/testing:parameterized",
"@com_google_protobuf//:protobuf_python",
] + select({
"@platforms//os:windows": [],
"//conditions:default": [
":sample_cel_ext_cc",
"//cel_expr_python:cel",
],
}),
)