mirror of
https://github.com/google/benchmark.git
synced 2024-12-26 20:40:21 +08:00
f59d021ebc
distutils is deprecated and will be removed in Python 3.12, so this commit modernizes the Python bindings `setup.py` file in order to future-proof the code. On top of this, type hints were added for all of the convenience functions to make static type checking adoption easier in the future, if desired. A context manager was added to temporarily write the Python include path to the Bazel WORKSPACE file - but unlike previously, the WORKSPACE file is reverted to its previous state after the build to not produce changes on every rebuild. Lastly, the Python bindings test matrix was extended to all major platforms to create a more complete picture of the current state of the bindings, especially with regards to upcoming wheel builds.
23 lines
574 B
Python
23 lines
574 B
Python
workspace(name = "com_github_google_benchmark")
|
|
|
|
load("//:bazel/benchmark_deps.bzl", "benchmark_deps")
|
|
|
|
benchmark_deps()
|
|
|
|
load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")
|
|
|
|
rules_foreign_cc_dependencies()
|
|
|
|
load("@rules_python//python:pip.bzl", pip3_install="pip_install")
|
|
|
|
pip3_install(
|
|
name = "py_deps",
|
|
requirements = "//:requirements.txt",
|
|
)
|
|
|
|
new_local_repository(
|
|
name = "python_headers",
|
|
build_file = "@//bindings/python:python_headers.BUILD",
|
|
path = "<PYTHON_INCLUDE_PATH>", # May be overwritten by setup.py.
|
|
)
|