• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load("//bindings/python:build_defs.bzl", "py_extension")
2
3py_library(
4    name = "google_benchmark",
5    srcs = ["__init__.py"],
6    visibility = ["//visibility:public"],
7    deps = [
8        ":_benchmark",
9    ],
10)
11
12py_extension(
13    name = "_benchmark",
14    srcs = ["benchmark.cc"],
15    copts = [
16        "-fexceptions",
17        "-fno-strict-aliasing",
18    ],
19    features = [
20        "-use_header_modules",
21        "-parse_headers",
22    ],
23    deps = [
24        "//:benchmark",
25        "@nanobind",
26        "@python_headers",
27    ],
28)
29
30py_test(
31    name = "example",
32    srcs = ["example.py"],
33    python_version = "PY3",
34    srcs_version = "PY3",
35    visibility = ["//visibility:public"],
36    deps = [
37        ":google_benchmark",
38    ],
39)
40
41