Skip to content
Snippets Groups Projects
Commit 181e3de9 authored by Gael Varoquaux's avatar Gael Varoquaux
Browse files

BUG: Make sure the docs build even if the directories do not exist.


git-svn-id: https://scikit-learn.svn.sourceforge.net/svnroot/scikit-learn/trunk@668 22fbfee3-77ab-4535-9bad-27d1bd3bc7d8
parent 7e8c34e2
No related branches found
No related tags found
No related merge requests found
"""
generate the rst files for the examples by iterating over the pylab examples.
Example generation for the scikit learn
Images must be created manually and dropped in directory auto_examples/images. Files that generate images should start with 'plot'
Generate the rst files for the examples by iterating over the python
example files.
Files that generate images should start with 'plot'
"""
import os
......@@ -91,6 +94,9 @@ def generate_example_rst(app):
# generate the plot as png image if file name
# starts with plot and if it is more recent than an
# existing image.
if not os.path.exists(
os.path.join(rootdir, 'images')):
os.makedirs(os.path.join(rootdir, 'images'))
image_file = os.path.join(rootdir, 'images', image_name)
if (not os.path.exists(image_file) or
os.stat(image_file).st_mtime <=
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment