From 643bd0650bd218a873d9b92a75f0b3af049e4102 Mon Sep 17 00:00:00 2001 From: oesteban Date: Wed, 1 Jan 2020 22:30:29 -0800 Subject: [PATCH] DOC: Bring examples generation back to ``doc/conf.py`` --- doc/Makefile | 4 ++-- doc/conf.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index 6d824162e1..e224c20cbc 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -32,7 +32,7 @@ htmlonly: @echo @echo "Build finished. The HTML pages are in _build/html." -html: clean examples2rst htmlonly +html: clean htmlonly @echo "Build HTML and API finished." examples2rst: clean @@ -40,7 +40,7 @@ examples2rst: clean ../tools/make_examples.py -x ../../../examples/test_spm.py --no-exec @echo "examples2rst finished." -latex: clean examples2rst +latex: clean $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex @echo @echo "Build finished; the LaTeX files are in _build/latex." diff --git a/doc/conf.py b/doc/conf.py index 23f5ddf205..e1da69f130 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -16,6 +16,9 @@ from packaging.version import Version import nipype +os.makedirs('users/examples', exist_ok=True) +os.system('python ../tools/make_examples.py -x ../../../examples/test_spm.py --no-exec') + # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here.