fix: Don't require downstream users to register Python toolchains.

The Python toolchains are only needed for dev purposes (doc generation).

Unfortunately, Bazel doesn't provide an easy way to mark a
register_toolchains() call as dev-only. To work around this, we use an
extension to create a repository whose contents depend on if its the
root module or not. If its the root module, it means we're the
rules_testing module and its the dev-dependency case, so write a
build file with the real toolchains. If its not the root module, then
its not the dev-dependency case, so write an empty build file.

Fixes #33
4 files changed
tree: 76b620f3b5b960a014e6a8f87732afd133c05b7b
  1. .bazelci/
  2. .bcr/
  3. .github/
  4. docgen/
  5. docs/
  6. e2e/
  7. lib/
  8. tests/
  9. .bazelignore
  10. .bazelrc
  11. .gitignore
  12. .readthedocs.yaml
  13. addlicense.sh
  14. AUTHORS
  15. BUILD
  16. CODEOWNERS
  17. CONTRIBUTING.md
  18. dev_extension.bzl
  19. LICENSE
  20. MODULE.bazel
  21. README.md
  22. RELEASING.md
  23. WORKSPACE.bazel
  24. WORKSPACE.bzlmod
README.md

Buildstatus

Framworks and utilities for testing Bazel Starlark rules

rules_testing provides frameworks and utilities to make testing Starlark rules easier and convenient.

For detailed docs, see the docs directory.