1load("@nanobind_bazel//:build_defs.bzl", "nanobind_extension", "nanobind_stubgen") 2 3py_library( 4 name = "google_benchmark", 5 srcs = ["__init__.py"], 6 visibility = ["//visibility:public"], 7 deps = [ 8 ":_benchmark", 9 ], 10) 11 12nanobind_extension( 13 name = "_benchmark", 14 srcs = ["benchmark.cc"], 15 deps = ["//:benchmark"], 16) 17 18nanobind_stubgen( 19 name = "benchmark_stubgen", 20 marker_file = "bindings/python/google_benchmark/py.typed", 21 module = ":_benchmark", 22) 23 24py_test( 25 name = "example", 26 srcs = ["example.py"], 27 python_version = "PY3", 28 srcs_version = "PY3", 29 visibility = ["//visibility:public"], 30 deps = [ 31 ":google_benchmark", 32 ], 33) 34