From 667ed13f3b96f429054715072c0bfe9847f82083 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Fri, 11 Oct 2024 14:40:36 -0700 Subject: [PATCH 1/2] fix(sphinxdocs): allow using sphinx_stardoc with bzlmod Using the sphinx_stardoc rule doesn't work with bzlmod because it refers to the stardoc repo, which was a dev dependency. This means, even if a user's root module has visibility to stardoc, rules_python doesn't. To fix, make stardoc a non-dev dependency. With bzlmod semantics, stardoc won't actually be loaded unless a user depends on it by using sphinxdocs. --- MODULE.bazel | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MODULE.bazel b/MODULE.bazel index 780d7f8666..390e81a6d8 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -66,8 +66,10 @@ pip.parse( ) use_repo(pip, "rules_python_publish_deps") +# Not a dev dependency to allow usage of //sphinxdocs code, which refers to stardoc repos. +bazel_dep(name = "stardoc", version = "0.6.2", repo_name = "io_bazel_stardoc") + # ===== DEV ONLY DEPS AND SETUP BELOW HERE ===== -bazel_dep(name = "stardoc", version = "0.6.2", dev_dependency = True, repo_name = "io_bazel_stardoc") bazel_dep(name = "rules_bazel_integration_test", version = "0.20.0", dev_dependency = True) bazel_dep(name = "rules_testing", version = "0.6.0", dev_dependency = True) From 9ad04d0ed74daa23640062294e786f88847b1964 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Mon, 14 Oct 2024 21:11:25 -0700 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 835d541641..9cc3cbca97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ A brief description of the categories of changes: (or equivalent). * (toolchains) `py_runtime.implementation_name` now defaults to `cpython` (previously it defaulted to None). +* (deps) stardoc 0.6.2 added as dependency. ### Fixed * (bzlmod) The `python.override(minor_mapping)` now merges the default and the