mirror of
https://github.com/tcsenpai/Zundler.git
synced 2025-06-06 11:35:40 +00:00
Ensure zundler runs last when building with sphinx
This commit is contained in:
parent
8338cb62f7
commit
8f14aef403
@ -26,9 +26,7 @@ class ZundlerBuilder(StandaloneHTMLBuilder):
|
||||
self.app.original_outdir
|
||||
)
|
||||
|
||||
def finish(self):
|
||||
super().finish()
|
||||
|
||||
def run_zundler(self):
|
||||
from zundler.embed import embed_assets
|
||||
|
||||
root_doc = self.config.zundler_root_doc
|
||||
@ -54,6 +52,10 @@ class ZundlerBuilder(StandaloneHTMLBuilder):
|
||||
)
|
||||
|
||||
|
||||
def run_zundler(app, exception):
|
||||
app.builder.run_zundler()
|
||||
|
||||
|
||||
def setup(app):
|
||||
# Fix the outdir. We want to build the files into $builddir/html first,
|
||||
# then $builddir/$target second.
|
||||
@ -94,6 +96,10 @@ def setup(app):
|
||||
|
||||
app.add_builder(ZundlerBuilder)
|
||||
|
||||
# This should run as the last function in the build-finished event
|
||||
# Set a high priority and hope nothing is higher
|
||||
app.connect("build-finished", run_zundler, priority=2**32)
|
||||
|
||||
return {
|
||||
"version": "0.1",
|
||||
"parallel_read_safe": True,
|
||||
|
Loading…
x
Reference in New Issue
Block a user