2024-07-30 14:49:33 +00:00
|
|
|
load("@nanobind_bazel//:build_defs.bzl", "nanobind_extension", "nanobind_stubgen")
|
2020-05-06 16:28:29 +00:00
|
|
|
|
|
|
|
py_library(
|
2020-07-09 08:23:06 +00:00
|
|
|
name = "google_benchmark",
|
2020-05-06 16:28:29 +00:00
|
|
|
srcs = ["__init__.py"],
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
|
|
|
":_benchmark",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2024-03-07 12:28:55 +00:00
|
|
|
nanobind_extension(
|
2020-05-06 16:28:29 +00:00
|
|
|
name = "_benchmark",
|
|
|
|
srcs = ["benchmark.cc"],
|
2024-03-07 12:28:55 +00:00
|
|
|
deps = ["//:benchmark"],
|
2020-05-06 16:28:29 +00:00
|
|
|
)
|
|
|
|
|
2024-07-30 14:49:33 +00:00
|
|
|
nanobind_stubgen(
|
|
|
|
name = "benchmark_stubgen",
|
|
|
|
marker_file = "bindings/python/google_benchmark/py.typed",
|
|
|
|
module = ":_benchmark",
|
|
|
|
)
|
|
|
|
|
2020-05-06 16:28:29 +00:00
|
|
|
py_test(
|
|
|
|
name = "example",
|
|
|
|
srcs = ["example.py"],
|
|
|
|
python_version = "PY3",
|
|
|
|
srcs_version = "PY3",
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
2020-07-09 08:23:06 +00:00
|
|
|
":google_benchmark",
|
2020-05-06 16:28:29 +00:00
|
|
|
],
|
|
|
|
)
|