Skip to content

Joho sphinx upstream adoption - #405

Merged
LittleHuba merged 2 commits into
mainfrom
joho_sphinx_upstream_adoption
Aug 6, 2026
Merged

Joho sphinx upstream adoption#405
LittleHuba merged 2 commits into
mainfrom
joho_sphinx_upstream_adoption

Conversation

@hoe-jo

@hoe-jo hoe-jo commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

hoe-jo added 2 commits August 6, 2026 12:50
… 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.
@LittleHuba
LittleHuba merged commit ab13b74 into main Aug 6, 2026
14 checks passed
@LittleHuba
LittleHuba deleted the joho_sphinx_upstream_adoption branch August 6, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants