Skip to content

Commit

Permalink
use makefile via tox
Browse files Browse the repository at this point in the history
  • Loading branch information
danibene committed Mar 14, 2024
1 parent 59cfd6b commit 605d75c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,15 @@ endif
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

postprocess:
@echo "Running postprocessing script..."
python ./postprocess.py

clean:
rm -rf $(BUILDDIR)/* $(AUTODOCDIR)

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(MAKE) postprocess
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ commands =


[testenv:{docs,doctests,linkcheck}]
allowlist_externals = make
description =
docs: Invoke sphinx-build to build the docs
doctests: Invoke sphinx-build to run doctests
Expand All @@ -72,8 +73,7 @@ deps =
-r {toxinidir}/docs/requirements.txt
# ^ requirements.txt shared with Read The Docs
commands =
sphinx-build --color -b {env:BUILD} -d "{env:BUILDDIR}/doctrees" "{env:DOCSDIR}" "{env:BUILDDIR}/{env:BUILD}" {posargs}
python docs/postprocess.py
make -C {toxinidir}/docs html

[testenv:publish]
description =
Expand Down

0 comments on commit 605d75c

Please sign in to comment.