Skip to content

Commit 815413d

Browse files
committed
configure.ac: want sphinx_rtd_theme for doc builds
1 parent 2cf689f commit 815413d

File tree

3 files changed

+48
-4
lines changed

3 files changed

+48
-4
lines changed

Diff for: changes/next/docs-sphinx-rtd-theme

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Description:
2+
3+
Documentation now uses the theme from Read the Docs rather than the old
4+
custom one.
5+
6+
7+
Config changes:
8+
9+
None
10+
11+
12+
Upgrade instructions:
13+
14+
If you wish to (re)build the documentation, you will need to have the python
15+
module "sphinx_rtd_theme" available. On Debian, this is in the
16+
python3-sphinx-rtd-theme package.
17+
18+
19+
GitHub issue:
20+
21+
None

Diff for: configure.ac

+23-2
Original file line numberDiff line numberDiff line change
@@ -2271,7 +2271,7 @@ AS_IF(
22712271
[Do we have support for optimize __attribute__?])]
22722272
)
22732273

2274-
dnl documentation generation (sphinx, perl2rst, gitpython)
2274+
dnl documentation generation (sphinx, sphinx_rtd_theme, perl2rst, gitpython)
22752275
AC_DEFUN([WARN_DOCDEPS], [
22762276
AM_COND_IF([ENABLE_RELEASE_CHECKS],
22772277
[AC_MSG_ERROR([No $1, cannot regenerate docs])],
@@ -2307,8 +2307,28 @@ AS_CASE([$HAVE_PYMOD_GIT],
23072307
[*], [WARN_DOCDEPS([GitPython])])
23082308
])
23092309

2310+
# XXX icky and slightly bogus* to have to duplicate this python2/python3 mess,
2311+
# XXX but i think it's not worth generalising now when we'll surely drop
2312+
# XXX python2 support sooner or later anyway
2313+
# XXX (* this check inherits the successful PYTHON from the check above, and
2314+
# XXX doesn't actually check both despite looking like it will. that's fine...
2315+
# XXX it only works if both modules are installed for the same python anyway!)
2316+
AX_PYTHON_MODULE([sphinx_rtd_theme], [], [python2])
2317+
AS_CASE([$HAVE_PYMOD_SPHINX_RTD_THEME],
2318+
[yes], [],
2319+
[*], [
2320+
unset PYTHON # work around AX_PYTHON_MODULE not cleaning up
2321+
AX_PYTHON_MODULE([sphinx_rtd_theme], [], [python3])
2322+
AS_CASE([$HAVE_PYMOD_SPHINX_RTD_THEME],
2323+
[yes], [],
2324+
[*], [WARN_DOCDEPS([sphinx_rtd_theme])])
2325+
])
2326+
23102327
AM_CONDITIONAL([HAVE_SPHINX_BUILD],
2311-
[ test -n "$SPHINX_BUILD" -a x"$have_ppvr" = xyes -a x"$HAVE_PYMOD_GIT" = xyes])
2328+
[ test -n "$SPHINX_BUILD" \
2329+
-a x"$have_ppvr" = xyes \
2330+
-a x"$HAVE_PYMOD_GIT" = xyes \
2331+
-a x"$HAVE_PYMOD_SPHINX_RTD_THEME" = xyes])
23122332

23132333
AH_TOP([
23142334
/*
@@ -2584,6 +2604,7 @@ Search engine:
25842604

25852605
Documentation dependencies:
25862606
sphinx-build: $SPHINX_BUILD
2607+
sphinx_rtd_theme: $HAVE_PYMOD_SPHINX_RTD_THEME
25872608
Pod::POM::View::Restructured: $have_ppvr
25882609
GitPython: $HAVE_PYMOD_GIT
25892610

Diff for: docsrc/imap/developer/compiling.rst

+4-2
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ and included in the release, and do not normally need to be re-built.
8989
`perl(Pod::POM::View::Restructured)`_,,, "no", "Needed to generate man
9090
pages. This has to be available to the system-wide perl interpreter, found
9191
by ``which``."
92-
`python(GitPython)`_,,, "no", "Needed for building the documentation."
93-
`python(Sphinx)`_,,, "no", "Needed for building the documentation."
92+
`python(GitPython)`_,python3-git,, "no", "Needed for building the documentation."
93+
`python(sphinx_rtd_theme)`_,python3-sphinx-rtd-theme,, "no", "Needed for building the documentation."
94+
`python(Sphinx)`_,python3-sphinx,, "no", "Needed for building the documentation."
9495
`transfig`_, transfig, transfig, "no", "Also known as fig2dev, transfig is
9596
an artifact from the old days, and is only used for generation of a couple
9697
of png files in the legacy documentation (doc/legacy/murder.png and
@@ -218,6 +219,7 @@ Other
218219
.. _perl-devel: http://www.perl.org/
219220
.. _postgresql: http://www.postgresql.org/
220221
.. _python(GitPython): https://github.com/gitpython-developers/GitPython
222+
.. _python(sphinx_rtd_theme): https://github.com/readthedocs/sphinx_rtd_theme
221223
.. _python(Sphinx): https://www.sphinx-doc.org/
222224
.. _shapelib: http://shapelib.maptools.org
223225
.. _libsrs2: https://www.libsrs2.org/

0 commit comments

Comments
 (0)