Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit da98762

Browse files
committed
Stop make.py removing generated documentation figs
1 parent 047c60a commit da98762

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

doc/make.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,6 @@ def html():
145145
if os.system('sphinx-build %s -b html -d build/doctrees . build/html' % options):
146146
raise SystemExit("Building HTML failed.")
147147

148-
figures_dest_path = 'build/html/pyplots'
149-
if os.path.exists(figures_dest_path):
150-
shutil.rmtree(figures_dest_path)
151-
copytree(
152-
'pyplots', figures_dest_path,
153-
ignore=ignore_patterns("*.pyc"))
154-
155148
# Clean out PDF files from the _images directory
156149
for filename in glob.glob('build/html/_images/*.pdf'):
157150
os.remove(filename)

lib/matplotlib/sphinxext/plot_directive.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ def render_figures(code, code_path, output_dir, output_base, context,
575575
function_name, config, context_reset=False):
576576
"""
577577
Run a pyplot script and save the low and high res PNGs and a PDF
578-
in outdir.
578+
in *output_dir*.
579579
580580
Save the images under *output_dir* with file names derived from
581581
*output_base*
@@ -598,7 +598,6 @@ def render_figures(code, code_path, output_dir, output_base, context,
598598

599599
code_pieces = split_code_at_show(code)
600600

601-
# Look for single-figure output files first
602601
# Look for single-figure output files first
603602
all_exists = True
604603
img = ImageFile(output_base, output_dir)

0 commit comments

Comments
 (0)