From f5afd0a8be9d5366edce0195ffb8c449fe3cb569 Mon Sep 17 00:00:00 2001 From: Anton Lydike Date: Fri, 23 Apr 2021 19:09:44 +0200 Subject: [PATCH] more readthedocs fixes? --- .readthedocs.yaml | 1 + generate-docs.sh | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 19dfbd7..ebb9295 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -7,6 +7,7 @@ version: 2 # Build documentation in the docs/ directory with Sphinx sphinx: + builder: html configuration: sphinx-docs/source/conf.py # Optionally set the version of Python and requirements required to build your docs diff --git a/generate-docs.sh b/generate-docs.sh index e3c9632..511f484 100755 --- a/generate-docs.sh +++ b/generate-docs.sh @@ -3,20 +3,22 @@ echo "Generating docs!" -if command -v 'sphinx-apidoc' >/dev/null; then +if ! command -v 'sphinx-apidoc'; then source venv/bin/activate pip install sphinx fi if [[ $1 == 'generate' ]]; then - PYTHONPATH=../../ sphinx-apidoc -e -f -o . ../../riscemu ../../riscemu/colors.py ../../riscemu/__main__.py echo "only generating, not building..." + rm ./modules.rst exit 0 fi PYTHONPATH=. sphinx-apidoc -e -f -o sphinx-docs/source riscemu riscemu/colors.py riscemu/__main__.py +rm sphinx-docs/source/modules.rst + cd sphinx-docs make html