[Epydoc-commits] SF.net SVN: epydoc: [1807] trunk/epydoc/src/epydoc/cli.py
Brought to you by:
edloper
|
From: <ed...@us...> - 2008-03-04 02:33:17
|
Revision: 1807
http://epydoc.svn.sourceforge.net/epydoc/?rev=1807&view=rev
Author: edloper
Date: 2008-03-03 18:32:58 -0800 (Mon, 03 Mar 2008)
Log Message:
-----------
- When latex is run with --debug or --v, display the latex warnings.
- Fixed bug in determining whether to re-run latex
Modified Paths:
--------------
trunk/epydoc/src/epydoc/cli.py
Modified: trunk/epydoc/src/epydoc/cli.py
===================================================================
--- trunk/epydoc/src/epydoc/cli.py 2008-03-04 02:31:57 UTC (rev 1806)
+++ trunk/epydoc/src/epydoc/cli.py 2008-03-04 02:32:58 UTC (rev 1807)
@@ -1056,9 +1056,16 @@
options.pdfdriver = 'latex'
log.info('%r pdfdriver selected' % options.pdfdriver)
- from epydoc.docwriter.latex import LatexWriter
+ from epydoc.docwriter.latex import LatexWriter, show_latex_warnings
latex_writer = LatexWriter(docindex, **options.__dict__)
- latex_writer.write(latex_target)
+ try:
+ latex_writer.write(latex_target)
+ except IOError, e:
+ log.error(e)
+ log.end_progress()
+ log.start_progress()
+ log.end_progress()
+ return
log.end_progress()
# Decide how many steps we need to go through.
@@ -1119,17 +1126,21 @@
# The third pass is only necessary if the second pass
# changed what page some things are on.
running = latex_command
- if _RERUN_LATEX_RE.match(out):
+ if _RERUN_LATEX_RE.search(out):
log.progress(step/steps, '%s (Third pass)' % LaTeX)
out, err = run_subprocess('%s api.tex' % latex_command)
# A fourth path should (almost?) never be necessary.
running = latex_command
- if _RERUN_LATEX_RE.match(out):
+ if _RERUN_LATEX_RE.search(out):
log.progress(step/steps, '%s (Fourth pass)' % LaTeX)
- run_subprocess('%s api.tex' % latex_command)
+ out, err = run_subprocess('%s api.tex' % latex_command)
step += 1
+ # Show the output, if verbosity is high:
+ if options.verbosity > 2 or epydoc.DEBUG:
+ show_latex_warnings(out)
+
# If requested, convert to postscript.
if ('ps' in options.actions or
('pdf' in options.actions and options.pdfdriver=='latex')):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|