mirror of
https://github.com/google/benchmark.git
synced 2024-12-26 20:40:21 +08: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>
51 lines
1.6 KiB
Plaintext
51 lines
1.6 KiB
Plaintext
module(
|
|
name = "google_benchmark",
|
|
version = "1.8.3",
|
|
)
|
|
|
|
bazel_dep(name = "bazel_skylib", version = "1.5.0")
|
|
bazel_dep(name = "platforms", version = "0.0.8")
|
|
bazel_dep(name = "rules_foreign_cc", version = "0.10.1")
|
|
bazel_dep(name = "rules_cc", version = "0.0.9")
|
|
|
|
bazel_dep(name = "rules_python", version = "0.31.0", dev_dependency = True)
|
|
bazel_dep(name = "googletest", version = "1.12.1", dev_dependency = True, repo_name = "com_google_googletest")
|
|
|
|
bazel_dep(name = "libpfm", version = "4.11.0")
|
|
|
|
# Register a toolchain for Python 3.9 to be able to build numpy. Python
|
|
# versions >=3.10 are problematic.
|
|
# A second reason for this is to be able to build Python hermetically instead
|
|
# of relying on the changing default version from rules_python.
|
|
|
|
python = use_extension("@rules_python//python/extensions:python.bzl", "python", dev_dependency = True)
|
|
python.toolchain(python_version = "3.8")
|
|
python.toolchain(python_version = "3.9")
|
|
python.toolchain(python_version = "3.10")
|
|
python.toolchain(python_version = "3.11")
|
|
python.toolchain(
|
|
is_default = True,
|
|
python_version = "3.12",
|
|
)
|
|
use_repo(
|
|
python,
|
|
python = "python_versions",
|
|
)
|
|
|
|
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip", dev_dependency = True)
|
|
pip.parse(
|
|
hub_name = "tools_pip_deps",
|
|
python_version = "3.9",
|
|
requirements_lock = "//tools:requirements.txt",
|
|
)
|
|
use_repo(pip, "tools_pip_deps")
|
|
|
|
# -- bazel_dep definitions -- #
|
|
|
|
bazel_dep(name = "nanobind_bazel", version = "", dev_dependency = True)
|
|
git_override(
|
|
module_name = "nanobind_bazel",
|
|
commit = "97e3db2744d3f5da244a0846a0644ffb074b4880",
|
|
remote = "https://github.com/nicholasjng/nanobind-bazel",
|
|
)
|