Joho sphinx upstream adoption - #405
Merged
Merged
Conversation
… listener Resolve GRAPHVIZ_DOT/PLANTUML_BIN at config-inited event (when cwd is back at execroot) instead of module-level in conf.py (which runs inside Sphinx's chdir(confdir)). Needed because sphinx_wrapper.py pre-converts env vars to absolute paths; without it, module-level abspath() would incorrectly resolve against confdir. Add init_hermetic_tools() listener in sphinx_conf_helpers, setting config.graphviz_dot/config.plantuml (already registered by Sphinx extensions). sphinx_module_ext connects it alongside init_external_needs. Test template connects directly and fixes setup() to call bazel_sphinx_needs as a statement.
…e wrapper Replace local sphinx_wrapper.py with rules_python's upstream sphinx_build_binary. The wrapper duplicated @file expansion and --persistent_worker dispatch logic that upstream already provides; hermetic tool-path fixup moved to a config-inited listener in the previous commit. Nothing load-bearing remains. Add py_binary_rule parameter to score_sphinx_toolchain (default: rules_python's py_binary) to allow consumers opting into aspect_rules_py's venv semantics. Passing package_collisions without overriding py_binary_rule now fails clearly. Delete sphinx_wrapper.py, sphinx_wrapper_lib, and test_sphinx_wrapper.py (tests now covered by rules_python's own suite). Test suite still passes; persistent worker invocation verified working.
hoe-jo
requested review from
LittleHuba,
castler,
limdor and
ramceb
as code owners
August 6, 2026 11:15
LittleHuba
approved these changes
Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.