Lines Matching refs:app

185 def setup(app):  argument
186 app.connect('builder-inited', builder_init_handler)
187 app.connect('build-finished', build_finished_handler)
189 app.petsc_dir = os.path.abspath(os.environ['PETSC_DIR'])
191app.petsc_dir = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
192 app.build_dir = os.path.abspath(os.getcwd())
194 def builder_init_handler(app): argument
196 if app.builder.name.endswith('html'):
197 build_manpages_c2html.main('pre',app.petsc_dir,app.build_dir,app.outdir)
198 _update_htmlmap_links(app)
206 def build_finished_handler(app, exception): argument
210 if app.builder.name.endswith('html'):
211 build_manpages_c2html.main('post',app.petsc_dir,app.build_dir,app.outdir)
212 build_petsc4py_docs(app)
213 _fix_links(app, exception)
214 _fix_man_page_edit_links(app, exception)
215 fix_pydata_margins.fix_pydata_margins(app.outdir)
216 if app.builder.name == 'dirhtml':
217 _add_man_page_redirects(app, exception)
219 if os.path.isdir(os.path.join(app.outdir,'_sources','manualpages')):
220 shutil.rmtree(os.path.join(app.outdir,'_sources','manualpages'))
221 if app.builder.name == 'html':
223 print(" open %s/index.html in your browser to view the documentation " % app.outdir)
226 def _add_man_page_redirects(app, exception): argument
232 add_man_page_redirects.add_man_page_redirects(app.outdir)
236 def _fix_man_page_edit_links(app, exception): argument
242 fix_man_page_edit_links.fix_man_page_edit_links(app.outdir)
251 def _fix_links(app, exception): argument
262 make_links_relative.make_links_relative(app.outdir)
267 def _update_htmlmap_links(app): argument
276 update_htmlmap_links.update_htmlmap_links(app.builder,os.path.join('manualpages','htmlmap'))
280 def build_petsc4py_docs(app): argument
284 'PETSC_DIR=%s' % app.petsc_dir,
291 subprocess.run(command, cwd=app.petsc_dir, check=True)
296 'PETSC_DIR=%s' % app.petsc_dir,
298 'LOC=%s' % app.outdir]
303 subprocess.run(command, cwd=os.path.join(app.petsc_dir,'src','binding','petsc4py'), check=True)