Skip to content

Commit

Permalink
debug 4
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcapet committed Apr 6, 2024
1 parent c576065 commit 1921586
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docs/conf.py
Expand Up @@ -18,7 +18,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os

import shutil
import sys

sys.path.insert(0, os.path.abspath('..'))
Expand Down Expand Up @@ -250,6 +250,11 @@
_docs_to_remove = []


def config_inited(app, config):
if on_rtd:
shutil.rmtree(os.path.join(app.doctreedir, 'environment.pickle'))


def builder_inited(app):
"""Run during Sphinx `builder-inited` phase.
Expand All @@ -261,7 +266,6 @@ def builder_inited(app):
# Remove pages when builder matches any referenced in exclude_from_builder
if exclude_from_builder.get(app.builder.name):
_docs_to_remove.extend(exclude_from_builder[app.builder.name])
extensions[-4:] = []
print('reading _docs_to_remove')
print(_docs_to_remove)

Expand Down Expand Up @@ -328,6 +332,7 @@ def setup(app):
app.add_stylesheet('custom.css')

# Run extra steps to remove module docs when running with a non-html builder
app.connect('config-inited', config_inited)
app.connect('builder-inited', builder_inited)
app.connect('env-get-outdated', env_get_outdated)
app.connect('doctree-read', doctree_read)
Expand Down

0 comments on commit 1921586

Please sign in to comment.