Propagate the testonly= attribute in the pybind_extension macro. Motivation: Enable test-only pybind_extensions to depend on test-only targets.
diff --git a/build_defs.bzl b/build_defs.bzl index cdbcdf0..503ce33 100644 --- a/build_defs.bzl +++ b/build_defs.bzl
@@ -68,6 +68,7 @@ name = name + "_copy_so_to_pyd", src = name + ".so", out = name + ".pyd", + testonly = kwargs.get("testonly") ) native.alias(