doc/api/python/buildtools-module.html
changeset 432 f2ddfa555b0f
equal deleted inserted replaced
431:7685cec9fd3c 432:f2ddfa555b0f
       
     1 <?xml version="1.0" encoding="ascii"?>
       
     2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       
     3           "DTD/xhtml1-transitional.dtd">
       
     4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
       
     5 <head>
       
     6   <title>buildtools</title>
       
     7   <link rel="stylesheet" href="epydoc.css" type="text/css" />
       
     8   <script type="text/javascript" src="epydoc.js"></script>
       
     9 </head>
       
    10 
       
    11 <body bgcolor="white" text="black" link="blue" vlink="#204080"
       
    12       alink="#204080">
       
    13 <!-- ==================== NAVIGATION BAR ==================== -->
       
    14 <table class="navbar" border="0" width="100%" cellpadding="0"
       
    15        bgcolor="#a0c0ff" cellspacing="0">
       
    16   <tr valign="middle">
       
    17 
       
    18   <!-- Tree link -->
       
    19       <th>&nbsp;&nbsp;&nbsp;<a
       
    20         href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
       
    21 
       
    22   <!-- Index link -->
       
    23       <th>&nbsp;&nbsp;&nbsp;<a
       
    24         href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
       
    25 
       
    26   <!-- Help link -->
       
    27       <th>&nbsp;&nbsp;&nbsp;<a
       
    28         href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
       
    29 
       
    30       <th class="navbar" width="100%"></th>
       
    31   </tr>
       
    32 </table>
       
    33 <table width="100%" cellpadding="0" cellspacing="0">
       
    34   <tr valign="top">
       
    35     <td width="100%">
       
    36       <span class="breadcrumbs">
       
    37         Module&nbsp;buildtools
       
    38       </span>
       
    39     </td>
       
    40     <td>
       
    41       <table cellpadding="0" cellspacing="0">
       
    42         <!-- hide/show private -->
       
    43         <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
       
    44     onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
       
    45         <tr><td align="right"><span class="options"
       
    46             >[<a href="frames.html" target="_top">frames</a
       
    47             >]&nbsp;|&nbsp;<a href="buildtools-module.html"
       
    48             target="_top">no&nbsp;frames</a>]</span></td></tr>
       
    49       </table>
       
    50     </td>
       
    51   </tr>
       
    52 </table>
       
    53 <!-- ==================== MODULE DESCRIPTION ==================== -->
       
    54 <h1 class="epydoc">Module buildtools</h1><span class="codelink"><a href="buildtools-pysrc.html">source&nbsp;code</a></span><br /><br />
       
    55 <p>Enables creation of build command list in several formats.</p>
       
    56 <p>This module implements class that represent shell commands.
       
    57 It supports build stage and command parallelization (depends of the output format).
       
    58 CommandList can be generated in different format: ant, make, ebs, batch.</p>
       
    59 <p>Example:
       
    60 from mc.buildtools import CommandList, Convert
       
    61 list = CommandList()
       
    62 list.addCommand(&quot;epoc32rombuild&quot;, &quot;make_fpsx.bat..yy...&quot;, &quot;build_xx_rom&quot;)
       
    63 list.addCommand(&quot;epoc32rombuild&quot;, &quot;make_fpsx.bat..xx...&quot;, &quot;build_yy_rom&quot;)
       
    64 list.addCommand(&quot;epoc32rombuild&quot;, &quot;copy foo bar&quot;, &quot;simple copy&quot;, False)</p>
       
    65 <p>convert(list, &quot;outputfile.mk&quot;, &quot;make&quot;)
       
    66 convert(list, &quot;outputfile.ant.xml&quot;, &quot;ant&quot;)
       
    67 convert(list, &quot;outputfile.ebs.xml&quot;, &quot;ebs&quot;)
       
    68 convert(list, &quot;outputfile.bat&quot;, &quot;bat&quot;)</p><br /><br />
       
    69 
       
    70 <!-- ==================== CLASSES ==================== -->
       
    71 <a name="section-Classes"></a>
       
    72 <table class="summary" border="1" cellpadding="3"
       
    73        cellspacing="0" width="100%" bgcolor="white">
       
    74 <tr bgcolor="#70b0f0" class="table-header">
       
    75   <td colspan="2" class="table-header">
       
    76     <table border="0" cellpadding="0" cellspacing="0" width="100%">
       
    77       <tr valign="top">
       
    78         <td align="left"><span class="table-header">Classes</span></td>
       
    79         <td align="right" valign="top"
       
    80          ><span class="options">[<a href="#section-Classes"
       
    81          class="privatelink" onclick="toggle_private();"
       
    82          >hide private</a>]</span></td>
       
    83       </tr>
       
    84     </table>
       
    85   </td>
       
    86 </tr>
       
    87 <tr>
       
    88     <td width="15%" align="right" valign="top" class="summary">
       
    89       <span class="summary-type">&nbsp;</span>
       
    90     </td><td class="summary">
       
    91         <a href="buildtools.PreBuilder-class.html" class="summary-name">PreBuilder</a><br />
       
    92       This class implements an abstract prebuilder.
       
    93     </td>
       
    94   </tr>
       
    95 <tr>
       
    96     <td width="15%" align="right" valign="top" class="summary">
       
    97       <span class="summary-type">&nbsp;</span>
       
    98     </td><td class="summary">
       
    99         <a href="buildtools.Task-class.html" class="summary-name">Task</a><br />
       
   100       Abstract Task object.
       
   101     </td>
       
   102   </tr>
       
   103 <tr>
       
   104     <td width="15%" align="right" valign="top" class="summary">
       
   105       <span class="summary-type">&nbsp;</span>
       
   106     </td><td class="summary">
       
   107         <a href="buildtools.Command-class.html" class="summary-name">Command</a><br />
       
   108       This class implements a command definition.
       
   109     </td>
       
   110   </tr>
       
   111 <tr>
       
   112     <td width="15%" align="right" valign="top" class="summary">
       
   113       <span class="summary-type">&nbsp;</span>
       
   114     </td><td class="summary">
       
   115         <a href="buildtools.AntTask-class.html" class="summary-name">AntTask</a><br />
       
   116       Interface that defines supports for an Ant task rendering.
       
   117     </td>
       
   118   </tr>
       
   119 <tr>
       
   120     <td width="15%" align="right" valign="top" class="summary">
       
   121       <span class="summary-type">&nbsp;</span>
       
   122     </td><td class="summary">
       
   123         <a href="buildtools.Delete-class.html" class="summary-name">Delete</a><br />
       
   124       Implements file/directory deleletion mechanism.
       
   125     </td>
       
   126   </tr>
       
   127 <tr>
       
   128     <td width="15%" align="right" valign="top" class="summary">
       
   129       <span class="summary-type">&nbsp;</span>
       
   130     </td><td class="summary">
       
   131         <a href="buildtools.Copy-class.html" class="summary-name">Copy</a><br />
       
   132       Implement copy command.
       
   133     </td>
       
   134   </tr>
       
   135 <tr>
       
   136     <td width="15%" align="right" valign="top" class="summary">
       
   137       <span class="summary-type">&nbsp;</span>
       
   138     </td><td class="summary">
       
   139         <a href="buildtools.CommandList-class.html" class="summary-name">CommandList</a><br />
       
   140       This class allows to safely handle Command object into lists
       
   141     </td>
       
   142   </tr>
       
   143 <tr>
       
   144     <td width="15%" align="right" valign="top" class="summary">
       
   145       <span class="summary-type">&nbsp;</span>
       
   146     </td><td class="summary">
       
   147         <a href="buildtools.AbstractOutputWriter-class.html" class="summary-name">AbstractOutputWriter</a><br />
       
   148       Base class which contains define an AbstractOutputWriter.
       
   149     </td>
       
   150   </tr>
       
   151 <tr>
       
   152     <td width="15%" align="right" valign="top" class="summary">
       
   153       <span class="summary-type">&nbsp;</span>
       
   154     </td><td class="summary">
       
   155         <a href="buildtools.StringWriter-class.html" class="summary-name">StringWriter</a><br />
       
   156       Implements a Writer which is able to directly write to the output stream.
       
   157     </td>
       
   158   </tr>
       
   159 <tr>
       
   160     <td width="15%" align="right" valign="top" class="summary">
       
   161       <span class="summary-type">&nbsp;</span>
       
   162     </td><td class="summary">
       
   163         <a href="buildtools.EBSWriter-class.html" class="summary-name">EBSWriter</a><br />
       
   164       Implements EBS XML output format.
       
   165     </td>
       
   166   </tr>
       
   167 <tr>
       
   168     <td width="15%" align="right" valign="top" class="summary">
       
   169       <span class="summary-type">&nbsp;</span>
       
   170     </td><td class="summary">
       
   171         <a href="buildtools.AntWriter-class.html" class="summary-name">AntWriter</a><br />
       
   172       Implements Ant XML output format.
       
   173     </td>
       
   174   </tr>
       
   175 <tr>
       
   176     <td width="15%" align="right" valign="top" class="summary">
       
   177       <span class="summary-type">&nbsp;</span>
       
   178     </td><td class="summary">
       
   179         <a href="buildtools.MakeWriter-class.html" class="summary-name">MakeWriter</a><br />
       
   180       Implements Makefile writer.
       
   181     </td>
       
   182   </tr>
       
   183 </table>
       
   184 <!-- ==================== FUNCTIONS ==================== -->
       
   185 <a name="section-Functions"></a>
       
   186 <table class="summary" border="1" cellpadding="3"
       
   187        cellspacing="0" width="100%" bgcolor="white">
       
   188 <tr bgcolor="#70b0f0" class="table-header">
       
   189   <td colspan="2" class="table-header">
       
   190     <table border="0" cellpadding="0" cellspacing="0" width="100%">
       
   191       <tr valign="top">
       
   192         <td align="left"><span class="table-header">Functions</span></td>
       
   193         <td align="right" valign="top"
       
   194          ><span class="options">[<a href="#section-Functions"
       
   195          class="privatelink" onclick="toggle_private();"
       
   196          >hide private</a>]</span></td>
       
   197       </tr>
       
   198     </table>
       
   199   </td>
       
   200 </tr>
       
   201 <tr>
       
   202     <td width="15%" align="right" valign="top" class="summary">
       
   203       <span class="summary-type">&nbsp;</span>
       
   204     </td><td class="summary">
       
   205       <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   206         <tr>
       
   207           <td><span class="summary-sig"><a href="buildtools-module.html#convert" class="summary-sig-name">convert</a>(<span class="summary-sig-arg">cmdList</span>,
       
   208         <span class="summary-sig-arg">filename</span>,
       
   209         <span class="summary-sig-arg">outputtype</span>=<span class="summary-sig-default">&quot;ant&quot;</span>)</span><br />
       
   210       Helper to directly convert a command list into a specific runnable command format.</td>
       
   211           <td align="right" valign="top">
       
   212             <span class="codelink"><a href="buildtools-pysrc.html#convert">source&nbsp;code</a></span>
       
   213             
       
   214           </td>
       
   215         </tr>
       
   216       </table>
       
   217       
       
   218     </td>
       
   219   </tr>
       
   220 <tr>
       
   221     <td width="15%" align="right" valign="top" class="summary">
       
   222       <span class="summary-type">&nbsp;</span>
       
   223     </td><td class="summary">
       
   224       <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   225         <tr>
       
   226           <td><span class="summary-sig"><a name="get_writer"></a><span class="summary-sig-name">get_writer</span>(<span class="summary-sig-arg">buildTool</span>,
       
   227         <span class="summary-sig-arg">fileOut</span>)</span><br />
       
   228       Get a Writer for a specific format.</td>
       
   229           <td align="right" valign="top">
       
   230             <span class="codelink"><a href="buildtools-pysrc.html#get_writer">source&nbsp;code</a></span>
       
   231             
       
   232           </td>
       
   233         </tr>
       
   234       </table>
       
   235       
       
   236     </td>
       
   237   </tr>
       
   238 <tr>
       
   239     <td width="15%" align="right" valign="top" class="summary">
       
   240       <span class="summary-type">&nbsp;</span>
       
   241     </td><td class="summary">
       
   242       <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   243         <tr>
       
   244           <td><span class="summary-sig"><a name="supported_writers"></a><span class="summary-sig-name">supported_writers</span>()</span><br />
       
   245       Return the list of supported Writer.</td>
       
   246           <td align="right" valign="top">
       
   247             <span class="codelink"><a href="buildtools-pysrc.html#supported_writers">source&nbsp;code</a></span>
       
   248             
       
   249           </td>
       
   250         </tr>
       
   251       </table>
       
   252       
       
   253     </td>
       
   254   </tr>
       
   255 </table>
       
   256 <!-- ==================== VARIABLES ==================== -->
       
   257 <a name="section-Variables"></a>
       
   258 <table class="summary" border="1" cellpadding="3"
       
   259        cellspacing="0" width="100%" bgcolor="white">
       
   260 <tr bgcolor="#70b0f0" class="table-header">
       
   261   <td colspan="2" class="table-header">
       
   262     <table border="0" cellpadding="0" cellspacing="0" width="100%">
       
   263       <tr valign="top">
       
   264         <td align="left"><span class="table-header">Variables</span></td>
       
   265         <td align="right" valign="top"
       
   266          ><span class="options">[<a href="#section-Variables"
       
   267          class="privatelink" onclick="toggle_private();"
       
   268          >hide private</a>]</span></td>
       
   269       </tr>
       
   270     </table>
       
   271   </td>
       
   272 </tr>
       
   273 <tr class="private">
       
   274     <td width="15%" align="right" valign="top" class="summary">
       
   275       <span class="summary-type">&nbsp;</span>
       
   276     </td><td class="summary">
       
   277         <a href="buildtools-module.html#__writerConstructors" class="summary-name">__writerConstructors</a> = <code title="{'ant': AntWriter, 'make': MakeWriter, 'ebs': EBSWriter}">{'ant': AntWriter, 'make': MakeWriter, <code class="variable-ellipsis">...</code></code>
       
   278     </td>
       
   279   </tr>
       
   280 </table>
       
   281 <!-- ==================== FUNCTION DETAILS ==================== -->
       
   282 <a name="section-FunctionDetails"></a>
       
   283 <table class="details" border="1" cellpadding="3"
       
   284        cellspacing="0" width="100%" bgcolor="white">
       
   285 <tr bgcolor="#70b0f0" class="table-header">
       
   286   <td colspan="2" class="table-header">
       
   287     <table border="0" cellpadding="0" cellspacing="0" width="100%">
       
   288       <tr valign="top">
       
   289         <td align="left"><span class="table-header">Function Details</span></td>
       
   290         <td align="right" valign="top"
       
   291          ><span class="options">[<a href="#section-FunctionDetails"
       
   292          class="privatelink" onclick="toggle_private();"
       
   293          >hide private</a>]</span></td>
       
   294       </tr>
       
   295     </table>
       
   296   </td>
       
   297 </tr>
       
   298 </table>
       
   299 <a name="convert"></a>
       
   300 <div>
       
   301 <table class="details" border="1" cellpadding="3"
       
   302        cellspacing="0" width="100%" bgcolor="white">
       
   303 <tr><td>
       
   304   <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   305   <tr valign="top"><td>
       
   306   <h3 class="epydoc"><span class="sig"><span class="sig-name">convert</span>(<span class="sig-arg">cmdList</span>,
       
   307         <span class="sig-arg">filename</span>,
       
   308         <span class="sig-arg">outputtype</span>=<span class="sig-default">&quot;ant&quot;</span>)</span>
       
   309   </h3>
       
   310   </td><td align="right" valign="top"
       
   311     ><span class="codelink"><a href="buildtools-pysrc.html#convert">source&nbsp;code</a></span>&nbsp;
       
   312     </td>
       
   313   </table>
       
   314   
       
   315   Helper to directly convert a command list into a specific runnable command format.
       
   316 e.g:
       
   317 cmdList = CommandList()
       
   318 cmdList.addCommand(...)
       
   319 convert(cmdList, &quot;echo Hello world&quot;, &quot;ant&quot;)
       
   320   <dl class="fields">
       
   321   </dl>
       
   322 </td></tr></table>
       
   323 </div>
       
   324 <br />
       
   325 <!-- ==================== VARIABLES DETAILS ==================== -->
       
   326 <a name="section-VariablesDetails"></a>
       
   327 <table class="details" border="1" cellpadding="3"
       
   328        cellspacing="0" width="100%" bgcolor="white">
       
   329 <tr bgcolor="#70b0f0" class="table-header">
       
   330   <td colspan="2" class="table-header">
       
   331     <table border="0" cellpadding="0" cellspacing="0" width="100%">
       
   332       <tr valign="top">
       
   333         <td align="left"><span class="table-header">Variables Details</span></td>
       
   334         <td align="right" valign="top"
       
   335          ><span class="options">[<a href="#section-VariablesDetails"
       
   336          class="privatelink" onclick="toggle_private();"
       
   337          >hide private</a>]</span></td>
       
   338       </tr>
       
   339     </table>
       
   340   </td>
       
   341 </tr>
       
   342 </table>
       
   343 <a name="__writerConstructors"></a>
       
   344 <div class="private">
       
   345 <table class="details" border="1" cellpadding="3"
       
   346        cellspacing="0" width="100%" bgcolor="white">
       
   347 <tr><td>
       
   348   <h3 class="epydoc">__writerConstructors</h3>
       
   349   
       
   350   <dl class="fields">
       
   351   </dl>
       
   352   <dl class="fields">
       
   353     <dt>Value:</dt>
       
   354       <dd><table><tr><td><pre class="variable">
       
   355 {'ant': AntWriter, 'make': MakeWriter, 'ebs': EBSWriter}
       
   356 </pre></td></tr></table>
       
   357 </dd>
       
   358   </dl>
       
   359 </td></tr></table>
       
   360 </div>
       
   361 <br />
       
   362 <!-- ==================== NAVIGATION BAR ==================== -->
       
   363 <table class="navbar" border="0" width="100%" cellpadding="0"
       
   364        bgcolor="#a0c0ff" cellspacing="0">
       
   365   <tr valign="middle">
       
   366 
       
   367   <!-- Tree link -->
       
   368       <th>&nbsp;&nbsp;&nbsp;<a
       
   369         href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
       
   370 
       
   371   <!-- Index link -->
       
   372       <th>&nbsp;&nbsp;&nbsp;<a
       
   373         href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
       
   374 
       
   375   <!-- Help link -->
       
   376       <th>&nbsp;&nbsp;&nbsp;<a
       
   377         href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
       
   378 
       
   379       <th class="navbar" width="100%"></th>
       
   380   </tr>
       
   381 </table>
       
   382 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
       
   383   <tr>
       
   384     <td align="left" class="footer">
       
   385     Generated by Epydoc 3.0beta1 on Wed Sep 09 13:44:15 2009
       
   386     </td>
       
   387     <td align="right" class="footer">
       
   388       <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
       
   389     </td>
       
   390   </tr>
       
   391 </table>
       
   392 
       
   393 <script type="text/javascript">
       
   394   <!--
       
   395   // Private objects are initially displayed (because if
       
   396   // javascript is turned off then we want them to be
       
   397   // visible); but by default, we want to hide them.  So hide
       
   398   // them unless we have a cookie that says to show them.
       
   399   checkCookie()
       
   400   // -->
       
   401 </script>
       
   402   
       
   403 </body>
       
   404 </html>