Skip to content

Commit

Permalink
DOC: explicitly require Sphinx >= 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pv committed Oct 1, 2010
1 parent 4510c4a commit 6716be4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 22 deletions.
4 changes: 1 addition & 3 deletions doc/HOWTO_BUILD_DOCS.txt
Expand Up @@ -3,9 +3,7 @@ Building the NumPy API and reference docs
=========================================

We currently use Sphinx_ for generating the API and reference
documentation for Numpy. You will need Sphinx 0.5 or newer. Sphinx's
current development version also works as of now (2009-06-24), and
using it is recommended though not required.
documentation for Numpy. You will need Sphinx 1.0.1 or newer.

If you only want to get the documentation, note that pre-built
versions can be found at
Expand Down
7 changes: 0 additions & 7 deletions doc/Makefile
Expand Up @@ -11,8 +11,6 @@ PAPER =

FILES=

NEED_AUTOSUMMARY = $(shell $(PYTHON) -c 'import sphinx; print sphinx.__version__ < "0.7" and "1" or ""')

# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
Expand Down Expand Up @@ -99,11 +97,6 @@ dist-build:
generate: build/generate-stamp
build/generate-stamp: $(wildcard source/reference/*.rst)
mkdir -p build
ifeq ($(NEED_AUTOSUMMARY),1)
$(PYTHON) \
./sphinxext/autosummary_generate.py source/reference/*.rst \
-p dump.xml -o source/reference/generated
endif
touch build/generate-stamp

html: generate
Expand Down
19 changes: 7 additions & 12 deletions doc/source/conf.py
Expand Up @@ -4,8 +4,10 @@

# Check Sphinx version
import sphinx
if sphinx.__version__ < "0.5":
raise RuntimeError("Sphinx 0.5.dev or newer required")
if sphinx.__version__ < "1.0.1":
raise RuntimeError("Sphinx 1.0.1 or newer required")

needs_sphinx = '1.0'

# -----------------------------------------------------------------------------
# General configuration
Expand All @@ -18,15 +20,9 @@

extensions = ['sphinx.ext.autodoc', 'sphinx.ext.pngmath', 'numpydoc',
'sphinx.ext.intersphinx', 'sphinx.ext.coverage',
'sphinx.ext.doctest',
'sphinx.ext.doctest', 'sphinx.ext.autosummary',
'plot_directive']

if sphinx.__version__ >= "0.7":
extensions.append('sphinx.ext.autosummary')
else:
extensions.append('autosummary')
extensions.append('only_directives')

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand Down Expand Up @@ -222,9 +218,8 @@
# Autosummary
# -----------------------------------------------------------------------------

if sphinx.__version__ >= "0.7":
import glob
autosummary_generate = glob.glob("reference/*.rst")
import glob
autosummary_generate = glob.glob("reference/*.rst")

# -----------------------------------------------------------------------------
# Coverage checker
Expand Down

0 comments on commit 6716be4

Please sign in to comment.