Skip to content

Commit

Permalink
Merge pull request #674 from collective/673-add-sphinx-autobuild
Browse files Browse the repository at this point in the history
Add `sphinx-autobuild` for `livehtml` Makefile target
  • Loading branch information
niccokunzmann committed Jul 1, 2024
2 parents f101956 + de4c31d commit a7062b9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ New features:

- Test compatibility with Python 3.12
- Add function ``icalendar.use_pytz()``.
- Add `sphinx-autobuild` for `livehtml` Makefile target.

Bug fixes:

Expand Down
19 changes: 13 additions & 6 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
LOCALESDIR = _locales
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXAUTOBUILD = sphinx-autobuild
PAPER =
BUILDDIR = _build
LOCALESDIR = _locales

# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
Expand All @@ -15,7 +16,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext livehtml

help:
@echo "Please use \`make <target>' where <target> is one of"
Expand Down Expand Up @@ -159,3 +160,9 @@ doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

livehtml:
$(SPHINXAUTOBUILD) \
--ignore "*.swp" \
--port 8050 \
-b html . "$(BUILDDIR)/html" $(SPHINXOPTS) $(O)
1 change: 1 addition & 0 deletions requirements_docs.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Sphinx>=1.2.3
sphinx_rtd_theme
sphinx-autobuild
.

0 comments on commit a7062b9

Please sign in to comment.