@@ -124,13 +124,12 @@ def _sphinx_build(self, kind):
124
124
if self .num_jobs :
125
125
cmd += ['-j' , str (self .num_jobs )]
126
126
if self .warnings_are_errors :
127
- cmd . append ( '-W' )
127
+ cmd += [ '-W' , '--keep-going' ]
128
128
if self .verbosity :
129
129
cmd .append ('-{}' .format ('v' * self .verbosity ))
130
130
cmd += ['-d' , os .path .join (BUILD_PATH , 'doctrees' ),
131
131
SOURCE_PATH , os .path .join (BUILD_PATH , kind )]
132
- cmd = ['sphinx-build' , SOURCE_PATH , os .path .join (BUILD_PATH , kind )]
133
- self ._run_os (* cmd )
132
+ return subprocess .call (cmd )
134
133
135
134
def _open_browser (self , single_doc_html ):
136
135
"""
@@ -144,13 +143,14 @@ def html(self):
144
143
"""
145
144
Build HTML documentation.
146
145
"""
147
- self ._sphinx_build ('html' )
146
+ ret_code = self ._sphinx_build ('html' )
148
147
zip_fname = os .path .join (BUILD_PATH , 'html' , 'pandas.zip' )
149
148
if os .path .exists (zip_fname ):
150
149
os .remove (zip_fname )
151
150
152
151
if self .single_doc_html is not None :
153
152
self ._open_browser (self .single_doc_html )
153
+ return ret_code
154
154
155
155
def latex (self , force = False ):
156
156
"""
@@ -159,7 +159,7 @@ def latex(self, force=False):
159
159
if sys .platform == 'win32' :
160
160
sys .stderr .write ('latex build has not been tested on windows\n ' )
161
161
else :
162
- self ._sphinx_build ('latex' )
162
+ ret_code = self ._sphinx_build ('latex' )
163
163
os .chdir (os .path .join (BUILD_PATH , 'latex' ))
164
164
if force :
165
165
for i in range (3 ):
@@ -170,12 +170,13 @@ def latex(self, force=False):
170
170
'"build/latex/pandas.pdf" for problems.' )
171
171
else :
172
172
self ._run_os ('make' )
173
+ return ret_code
173
174
174
175
def latex_forced (self ):
175
176
"""
176
177
Build PDF documentation with retries to find missing references.
177
178
"""
178
- self .latex (force = True )
179
+ return self .latex (force = True )
179
180
180
181
@staticmethod
181
182
def clean ():
@@ -257,7 +258,7 @@ def main():
257
258
258
259
builder = DocBuilder (args .num_jobs , not args .no_api , args .single ,
259
260
args .verbosity , args .warnings_are_errors )
260
- getattr (builder , args .command )()
261
+ return getattr (builder , args .command )()
261
262
262
263
263
264
if __name__ == '__main__' :
0 commit comments