mirror of https://github.com/google/benchmark.git
bazel support for tools (#982)
* packages versions updated to be in sync with modern python versions
This commit is contained in:
parent
d9abf01763
commit
348aa2c964
13
WORKSPACE
13
WORKSPACE
|
@ -34,3 +34,16 @@ new_local_repository(
|
|||
build_file = "@//bindings/python:python_headers.BUILD",
|
||||
path = "/usr/include/python3.6", # May be overwritten by setup.py.
|
||||
)
|
||||
|
||||
http_archive(
|
||||
name = "rules_python",
|
||||
url = "https://github.com/bazelbuild/rules_python/releases/download/0.1.0/rules_python-0.1.0.tar.gz",
|
||||
sha256 = "b6d46438523a3ec0f3cead544190ee13223a52f6a6765a29eae7b7cc24cc83a0",
|
||||
)
|
||||
|
||||
load("@rules_python//python:pip.bzl", pip3_install="pip_install")
|
||||
|
||||
pip3_install(
|
||||
name = "py_deps",
|
||||
requirements = "//:requirements.txt",
|
||||
)
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
numpy == 1.19.4
|
||||
scipy == 1.5.4
|
|
@ -0,0 +1,19 @@
|
|||
load("@py_deps//:requirements.bzl", "requirement")
|
||||
|
||||
py_library(
|
||||
name = "gbench",
|
||||
srcs = glob(["gbench/*.py"]),
|
||||
deps = [
|
||||
requirement("numpy"),
|
||||
requirement("scipy"),
|
||||
],
|
||||
)
|
||||
|
||||
py_binary(
|
||||
name = "compare",
|
||||
srcs = ["compare.py"],
|
||||
python_version = "PY2",
|
||||
deps = [
|
||||
":gbench",
|
||||
],
|
||||
)
|
Loading…
Reference in New Issue