#9426: Docbuilder ignores return code from subprocess.call()
-----------------------------+----------------------------------------------
   Reporter:  leif           |       Owner:  mvngu
       Type:  defect         |      Status:  new  
   Priority:  critical       |   Milestone:       
  Component:  documentation  |    Keywords:       
     Author:                 |    Upstream:  N/A  
   Reviewer:                 |      Merged:       
Work_issues:                 |  
-----------------------------+----------------------------------------------
 {{{devel/sage/doc/common/builder.py}}}:

 In {{{builder_helper.f()}}}:
 {{{
 ...
         logger.warning(build_command)
         subprocess.call(build_command, shell=True)

         logger.warning("Build finished.  The built documents can be found
 in %s", output_dir)
 ...
 }}}

 In {{{class DocBuilder}}}:
 {{{
     def pdf(self):
         """
         Builds the PDF files for this document.  This is done by first
         (re)-building the LaTeX output, going into that LaTeX
         directory, and running 'make all-pdf' there.

         EXAMPLES::

             sage: import os, sys;
 sys.path.append(os.environ['SAGE_DOC']+'/common/'); import builder
             sage: b = builder.DocBuilder('tutorial')
             sage: b.pdf() #not tested
         """
         self.latex()
         os.chdir(self._output_dir('latex'))
         subprocess.call('make all-pdf', shell=True)

         pdf_dir = self._output_dir('pdf')
         for pdf_file in glob.glob('*.pdf'):
             shutil.move(pdf_file, os.path.join(pdf_dir, pdf_file))

         logger.warning("Build finished.  The built documents can be found
 in %s", pdf_dir)
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9426>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to