File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
src/collective/recipe/sphinxbuilder Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -67,8 +67,8 @@ def install(self):
6767 extra_paths .append (filename )
6868 sys .path .extend (extra_paths )
6969
70- from sphinx . quickstart import MAKEFILE
71- from sphinx . quickstart import BATCHFILE
70+ from utils import MAKEFILE
71+ from utils import BATCHFILE
7272 from sphinx .util import make_filename
7373
7474 # and cleanup again
@@ -143,6 +143,26 @@ def install(self):
143143 self .buildout [self .buildout ['buildout' ]['python' ]]['executable' ],
144144 self .bin_dir , ** egg_options )
145145
146+ # patch sphinx-build script
147+ # change last line from sphinx.main() to sys.exit(sphinx.main())
148+ # so that errors are correctly reported to Travis CI.
149+
150+ sb = os .path .join (self .bin_dir , 'sphinx-build' )
151+ #Create temp file
152+ fh , abs_path = mkstemp ()
153+ new_file = open (abs_path ,'w' )
154+ old_file = open (sb )
155+ for line in old_file :
156+ new_file .write (line .replace ('sphinx.main()' , 'sys.exit(sphinx.main())' ))
157+ #close temp file
158+ new_file .close ()
159+ os .close (fh )
160+ old_file .close ()
161+ #Remove original file
162+ os .remove (sb )
163+ #Move new file
164+ shutil .move (abs_path , sb )
165+
146166 return [self .script_path , self .makefile_path , self .batchfile_path ]
147167
148168 update = install
Original file line number Diff line number Diff line change 2222help:
2323\t @echo "Please use \\ `make <target>' where <target> is one of"
2424\t @echo " html to make standalone HTML files"
25+ \t @echo " warnings-html to make standalone HTML files (warnings become errors)"
2526\t @echo " dirhtml to make HTML files named index.html in directories"
2627\t @echo " singlehtml to make a single large HTML file"
2728\t @echo " pickle to make pickle files"
185186\t :help
186187\t echo.Please use `make ^<target^>` where ^<target^> is one of
187188\t echo. html to make standalone HTML files
189+ \t echo. warnings-html to make standalone HTML files (turn warnings into errors)
188190\t echo. dirhtml to make HTML files named index.html in directories
189191\t echo. singlehtml to make a single large HTML file
190192\t echo. pickle to make pickle files
You can’t perform that action at this time.
0 commit comments