Skip to content

Commit

Permalink
Update Makefile to emulate readthedocs automation
Browse files Browse the repository at this point in the history
Major issue is readthedocs has fixed paths

Signed-off-by: Jhon Honce <[email protected]>
Signed-off-by: Urvashi Mohnani <[email protected]>
  • Loading branch information
jwhonce authored and umohnani8 committed Jun 5, 2023
1 parent 84fc7d2 commit 59dc162
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ python:

sphinx:
configuration: docs/source/conf.py
fail_on_warning: true
fail_on_warning: false

19 changes: 15 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 -----------------------------------------------------
Expand Down

0 comments on commit 59dc162

Please sign in to comment.