diff --git a/doc/source/conf.py b/doc/source/conf.py index fe10fecc6c..cef0b5e356 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -46,22 +46,16 @@ 'matplotlib.sphinxext.plot_directive', 'numpydoc', 'sphinx_copybutton', - 'sphinx_gallery.gen_gallery', ] -sphinx_gallery_conf = { - 'examples_dirs': '../../examples', - 'gallery_dirs': 'source/auto_examples' -} - -try: - import gen_rst -except: - pass - # only include examples if the BUILD_PYART_EXAMPLES env. variable is set if 'BUILD_PYART_EXAMPLES' in os.environ: - extensions.append('gen_rst') + extensions.append('sphinx_gallery.gen_gallery') + sphinx_gallery_conf = { + 'examples_dirs': '../../examples', + 'gallery_dirs': 'source/auto_examples' +} + # Configuration options for plot_directive. See: # https://github.com/matplotlib/matplotlib/blob/f3ed922d935751e08494e5fb5311d3050a3b637b/lib/matplotlib/sphinxext/plot_directive.py#L81