| load("@pybind11_bazel//:build_defs.bzl", "pybind_extension") |
| load("@rules_python//python:py_library.bzl", "py_library") |
| load("@rules_python//python:py_test.bzl", "py_test") |
| load("@rules_python//python:packaging.bzl", "py_wheel") |
| |
| pybind_extension( |
| name = "basic", |
| srcs = ["basic.cpp"], |
| ) |
| |
| py_wheel( |
| name = "basic_wheel", |
| testonly = True, |
| distribution = "basic", |
| version = "1.0.0", |
| deps = [":basic"], |
| ) |
| |
| py_library( |
| name = "basic_lib", |
| data = [":basic"], |
| imports = ["."], |
| ) |
| |
| py_wheel( |
| name = "basic_lib_wheel", |
| testonly = True, |
| distribution = "basic_lib", |
| version = "1.0.0", |
| deps = [":basic_lib"], |
| ) |
| |
| py_test( |
| name = "basic_test", |
| size="small", |
| srcs = ["basic_test.py"], |
| deps = [":basic_lib"], |
| ) |