File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 209209
210210def setup (app ):
211211
212- def setup_sphinx_compatibility ():
213- """
214- Resolve problem with `sphinx_build_compatibility` extension.
215-
216- Add Sphinx extension at runtime, in order to be able to configure it previously.
217- This is needed because it has some quirks that reveal themselves when invoked in
218- non-RTD environments.
219-
220- - https://github.com/crate/crate-docs-theme/issues/536
221- - https://about.readthedocs.com/blog/2024/07/addons-by-default/
222- - https://github.com/readthedocs/sphinx-build-compatibility
223- """
224-
225- # Extension error (sphinx_build_compatibility.extension):
226- # Handler <function manipulate_config at 0x10a4289a0> for event 'config-inited' threw an exception
227- # (exception: argument of type 'NoneType' is not iterable)
228- os .environ .setdefault ("READTHEDOCS_GIT_CLONE_URL" , "" )
229-
230- # IndexError: list index out of range
231- # project_id = response_project["results"][0]["id"]
232- # Currently needs a valid project on PyPI. Long-term fix should go into upstream code.
233- os .environ .setdefault ("READTHEDOCS_PROJECT" , "crate-docs-theme" )
234-
235- # Exception: 'NoneType' object is not subscriptable
236- os .environ .setdefault ("READTHEDOCS_GIT_COMMIT_HASH" , "" )
237-
238- # Register vendorized Sphinx plugin.
239- app .setup_extension ("crate.theme.vendor.rtd_compat.extension" )
240-
241212 # Configure Sphinx/RTD to host projects on a custom domain, but also on a non-root resource.
242213 def configure_self_hosted_on_path (app_inited ):
243214 """
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments