mirror of
https://github.com/google/benchmark.git
synced 2024-12-01 07:16:07 +00:00
eaafe694d2
* Add a bzlmod Python bindings build Uses the newly started `@nanobind_bazel` project to build nanobind extensions. This means that we can drop all in-tree custom build defs and build files for nanobind and the C++ Python headers. Additionally, the temporary WORKSPACE overwrite hack naturally goes away due to the WORKSPACE system being obsolete. * Bump ruff -> v0.3.1, change ruff settings The latest minor releases incurred some formatting and configuration changes, this commit rolls them out. --------- Co-authored-by: dominic <510002+dmah42@users.noreply.github.com>
28 lines
534 B
Python
28 lines
534 B
Python
load("@nanobind_bazel//:build_defs.bzl", "nanobind_extension")
|
|
|
|
py_library(
|
|
name = "google_benchmark",
|
|
srcs = ["__init__.py"],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":_benchmark",
|
|
],
|
|
)
|
|
|
|
nanobind_extension(
|
|
name = "_benchmark",
|
|
srcs = ["benchmark.cc"],
|
|
deps = ["//:benchmark"],
|
|
)
|
|
|
|
py_test(
|
|
name = "example",
|
|
srcs = ["example.py"],
|
|
python_version = "PY3",
|
|
srcs_version = "PY3",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
":google_benchmark",
|
|
],
|
|
)
|