Skip to content

Commit 01cbc31

Browse files
committed
needs_sphinx 1.4
1 parent 596c416 commit 01cbc31

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/source/conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
import sys
1616
import os
1717
import shlex
18+
import sphinx
19+
from sphinx.errors import VersionRequirementError
1820

1921
# If extensions (or modules to document with autodoc) are in another directory,
2022
# add these directories to sys.path here. If the directory is relative to the
@@ -24,7 +26,10 @@
2426
# -- General configuration ------------------------------------------------
2527

2628
# If your documentation needs a minimal Sphinx version, state it here.
27-
#needs_sphinx = '1.0'
29+
needs_sphinx = '1.4'
30+
if needs_sphinx > sphinx.__display_version__:
31+
message = 'This project needs at least Sphinx v%s' % needs_sphinx
32+
raise VersionRequirementError(message)
2833

2934
# Add any Sphinx extension module names here, as strings. They can be
3035
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom

0 commit comments

Comments
 (0)