Skip to content

Commit 8c1a071

Browse files
committed
DOCS: fix readthedocs build
1 parent 8bb82a5 commit 8c1a071

4 files changed

Lines changed: 27 additions & 16 deletions

File tree

.readthedocs.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ version: 2
99
build:
1010
os: ubuntu-24.04
1111
tools:
12-
python: "3.12"
12+
python: "mambaforge-23.11"
13+
jobs:
14+
pre_create_environment:
15+
- conda update --yes --quiet --name=base --channel=conda-forge conda
1316

1417
# Build documentation in the "docs/" directory with Sphinx
1518
sphinx:
1619
configuration: conf.py
1720

1821

19-
python:
20-
install:
21-
- requirements: docs/requirements.txt
22+
conda:
23+
environment: docs/environment.yml

conf.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,9 @@
242242
}
243243
]
244244

245+
# This allows skipping the build process because the object library is never required
246+
autodoc_mock_imports = ["spirit.spiritlib"]
247+
245248

246249
def pre_build_hook(_):
247250
"""
@@ -256,8 +259,8 @@ def pre_build_hook(_):
256259
subprocess.check_call(
257260
[
258261
"cmake",
259-
"-B build",
260-
"-S .",
262+
"-B", "build",
263+
"-S", ".",
261264
"-DSPIRIT_BUILD_FOR_CXX=OFF",
262265
"-DSPIRIT_BUILD_TEST=ON",
263266
"-DSPIRIT_SKIP_HTST=ON",

docs/environment.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: RTD
3+
channels:
4+
- nodefaults
5+
- conda-forge
6+
dependencies:
7+
- python>=3.11
8+
- pandoc
9+
- sphinx>=8.2
10+
- sphinx_rtd_theme
11+
- sphinx-markdown-tables
12+
- myst-parser
13+
- doxygen
14+
- breathe
15+
- numpy
16+
- cmake>=3.20

docs/requirements.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)