From 59dc1626903d7896a68b31d7cf09e908c7a78eef Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Wed, 2 Nov 2022 09:06:30 -0700 Subject: [PATCH] Update Makefile to emulate readthedocs automation Major issue is readthedocs has fixed paths Signed-off-by: Jhon Honce Signed-off-by: Urvashi Mohnani --- .readthedocs.yaml | 2 +- Makefile | 19 +++++++++++++++---- docs/source/conf.py | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 5b423e14..12156b89 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -11,5 +11,5 @@ python: sphinx: configuration: docs/source/conf.py - fail_on_warning: true + fail_on_warning: false diff --git a/Makefile b/Makefile index ee4cbe5e..dffb86ce 100644 --- a/Makefile +++ b/Makefile @@ -56,12 +56,23 @@ release: .PHONY: docs docs: - mkdir -p build/docs/source - cp -R docs/source/* build/docs/source + mkdir -p _build/doctrees + cp -R docs/source/* _build/doctrees sphinx-apidoc --separate --no-toc --force --templatedir build/docs/source/_templates/apidoc \ - -o build/docs/source \ + -o _build/doctrees \ podman podman/tests - sphinx-build build/docs/source build/html + # Previous Command: sphinx-build _build/doctrees _build/html + # + # HARD CODED COMMAND from readthedocs! We must conform! + # -T : traceback + # -E : do not use saved environment, always read all files + # -W : warnings reported as errors then --keep-going when getting warnings + # -b html : build html + # -d : path for cached environment and doctree files + # -D language=en : define language as en + # . : source directory + # _build/html : target + cd _build/doctrees && python3 -m sphinx -T -E -W --keep-going -b html -d _build/doctrees -D language=en . _build/html .PHONY: rpm rpm: ## Build rpm packages diff --git a/docs/source/conf.py b/docs/source/conf.py index 52cec3ef..c593d8b3 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -15,7 +15,7 @@ from sphinx.domains.python import PythonDomain -sys.path.insert(0, os.path.abspath('../../..')) +sys.path.insert(0, os.path.abspath('../..')) # -- Project information -----------------------------------------------------