fix: make python_headers targets compatible with layering checks by keith · Pull Request #3420 · bazel-contrib/rules_python

@keith

Previously the headers from this target were available because it
dpeends on python_headers_abi3, but that fails downstream
layering_checks since the headers weren't direct. Now it re-exports the
same headers as that underlying target to satisfy those checks.

Inspectable with:

```
bazel cquery --output=starlark --starlark:expr 'providers(target)["@@rules_cc+//cc/private:cc_info.bzl%CcInfo"].compilation_context.direct_public_headers' @rules_python//python/cc:current_py_cc_headers
```

gemini-code-assist[bot]

@rickeylev rickeylev changed the title Add hdrs to public_headers target fix: make python_headers targets compatible with layering checks

Nov 22, 2025

@rickeylev

@rickeylev

rickeylev