From 448105f128e60ff6a67a6fba1538a9c339443ed9 Mon Sep 17 00:00:00 2001 From: David Minton Date: Tue, 19 Dec 2023 17:30:26 -0500 Subject: [PATCH] Attempting to do a local build without library dependencies for RTD --- .readthedocs.yaml | 6 ++++-- docs/conf.py | 2 ++ docs/requirements.txt | 3 +-- pyproject.toml | 17 ++++++++++++++++- 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index f7be564af..6ea4f017f 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -18,8 +18,10 @@ build: jobs: pre_build: - ford fortran_docs.md - - CIBW_TEST_SKIP="*linux*" CIBW_BUILD="cp311-*" cibuildwheel --platform linux . - - pip install wheelhouse/swiftest*.whl python: install: + - method: pip + path: . + extra_requirements: + - docs - requirements: docs/requirements.txt diff --git a/docs/conf.py b/docs/conf.py index 2fa7c105c..165e3d26f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -11,6 +11,8 @@ import swiftest +autodoc_mock_imports = ['swiftest._bindings'] + # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information project = 'Swiftest' diff --git a/docs/requirements.txt b/docs/requirements.txt index 0aad41128..17daa313e 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -8,5 +8,4 @@ sphinxext-rediraffe sphinxext-opengraph nbsphinx ipython -ford -cibuildwheel \ No newline at end of file +ford \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 70cfa62a3..831396ab2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -141,4 +141,19 @@ CMAKE_INSTALL_LIBDIR="lib" [[tool.scikit-build.generate]] path = "version.txt" location = "source" -template = '''${version}''' \ No newline at end of file +template = '''${version}''' + +[project.optional-dependencies] +docs = [ + "sphinx", + "sphinx-autosummary-accessors", + "sphinx-book-theme >= 0.3.0", + "sphinx-copybutton", + "sphinx-design", + "sphinx-inline-tabs", + "sphinxext-rediraffe", + "sphinxext-opengraph", + "nbsphinx", + "ipython", + "ford", +]