Clean up documentation for pybind_extension.
1 file changed
tree: c49af80120a88a76498d3e35d36772a0245ea3c1
  1. py/
  2. AUTHORS
  3. BUILD
  4. build_defs.bzl
  5. CONTRIBUTING.md
  6. LICENSE
  7. pybind11.BUILD
  8. python_configure.bzl
  9. README.md
README.md

Bazel extensions for pybind11

In your build file:

load("//third_party/pybind11_bazel:build_defs.bzl", "pybind_extension")

Provided rules:

  • pybind_extension: Builds a python extension, automatically adding the required build flags and pybind11 dependencies. It also defines a .so target which can be manually built and copied. The arguments match a py_extension.
  • pybind_library: Builds a C++ library, automatically adding the required build flags and pybind11 dependencies. This library can then be used as a dependency of a pybind_extension. The arguments match a cc_library.
  • pybind_library_test: Builds a C++ test for a pybind_library. The arguments match a cc_test.

To test a pybind_extension, the most common approach is to write the test in python and use the standard py_test build rule.