From 222a4feb6706f5433f9d005e1f6d3ef6232b9abc Mon Sep 17 00:00:00 2001 From: David Minton Date: Tue, 19 Dec 2023 20:05:26 -0500 Subject: [PATCH] Trying to get the docs built without the _bindings module --- docs/conf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index b3bf79153..f8280af35 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -10,9 +10,11 @@ # Disable import of swiftest._bindings so that we don't have to build the Fortran code when building the docs autodoc_mock_imports = ['swiftest._bindings'] +# Check if we are building on Read the Docs +on_rtd = os.environ.get('READTHEDOCS') == 'True' -import swiftest - +if not on_rtd: + import swiftest # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information