BUILD 727 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. load("//bindings/python:build_defs.bzl", "py_extension")
  2. py_library(
  3. name = "google_benchmark",
  4. srcs = ["__init__.py"],
  5. visibility = ["//visibility:public"],
  6. deps = [
  7. ":_benchmark",
  8. # pip; absl:app
  9. ],
  10. )
  11. py_extension(
  12. name = "_benchmark",
  13. srcs = ["benchmark.cc"],
  14. copts = [
  15. "-fexceptions",
  16. "-fno-strict-aliasing",
  17. ],
  18. features = ["-use_header_modules"],
  19. deps = [
  20. "//:benchmark",
  21. "@pybind11",
  22. "@python_headers",
  23. ],
  24. )
  25. py_test(
  26. name = "example",
  27. srcs = ["example.py"],
  28. python_version = "PY3",
  29. srcs_version = "PY3",
  30. visibility = ["//visibility:public"],
  31. deps = [
  32. ":google_benchmark",
  33. ],
  34. )