88"""
99
1010import os
11+ import sys
1112import shutil
1213import inspect
1314import subprocess
@@ -38,6 +39,9 @@ def abspath(rel):
3839# output location for all the html
3940build_dir = abspath ('html' )
4041
42+ # sphinx produces a lot of output
43+ verbose = '-v' in sys .argv
44+
4145if __name__ == '__main__' :
4246 # convert README to an RST for sphinx
4347 pdc = ['pandoc' ,
@@ -55,7 +59,7 @@ def abspath(rel):
5559 except FileExistsError :
5660 pass
5761 exp = ['python' ,
58- abspath ('../tests/notebook_run .py' ),
62+ abspath ('../tests/notebooks .py' ),
5963 'examples' ,
6064 examples_dir ]
6165 subprocess .check_call (exp )
@@ -73,15 +77,21 @@ def abspath(rel):
7377 '-o' ,
7478 cwd ,
7579 abspath ('../trimesh' )]
76- subprocess .check_call (api )
77-
7880 # build the HTML docs
7981 bld = ['sphinx-build' ,
8082 '-b' ,
8183 'html' ,
8284 cwd ,
8385 build_dir ]
84- subprocess .check_call (bld )
86+
87+ if verbose :
88+ # sphinx produces a ton of useless output
89+ subprocess .check_call (api )
90+ subprocess .check_call (bld )
91+ else :
92+ print ('running sphinx, eating output' )
93+ subprocess .check_output (api , stderr = subprocess .DEVNULL )
94+ subprocess .check_output (bld , stderr = subprocess .DEVNULL )
8595
8696 # keep github pages from using jekyll
8797 with open (os .path .join (build_dir , '.nojekyll' ), 'w' ) as f :
0 commit comments