| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <link rel="STYLESHEET" href="dist.css" type='text/css' /> |
| 5 | <link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" /> |
| 6 | <link rel='start' href='../index.html' title='Python Documentation Index' /> |
| 7 | <link rel="first" href="dist.html" title='Distributing Python Modules' /> |
| 8 | <link rel='index' href='genindex.html' title='Index' /> |
| 9 | <link rel='last' href='about.html' title='About this document...' /> |
| 10 | <link rel='help' href='about.html' title='About this document...' /> |
| 11 | <link rel="next" href="module-distutils.command.html" /> |
| 12 | <link rel="prev" href="module-distutils.version.html" /> |
| 13 | <link rel="parent" href="api-reference.html" /> |
| 14 | <link rel="next" href="module-distutils.command.html" /> |
| 15 | <meta name='aesop' content='information' /> |
| 16 | <title>10.25 distutils.cmd -- Abstract base class for Distutils commands</title> |
| 17 | </head> |
| 18 | <body> |
| 19 | <DIV CLASS="navigation"> |
| 20 | <div id='top-navigation-panel' xml:id='top-navigation-panel'> |
| 21 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> |
| 22 | <tr> |
| 23 | <td class='online-navigation'><a rel="prev" title="10.24 distutils.version " |
| 24 | href="module-distutils.version.html"><img src='../icons/previous.png' |
| 25 | border='0' height='32' alt='Previous Page' width='32' /></A></td> |
| 26 | <td class='online-navigation'><a rel="parent" title="10. API Reference" |
| 27 | href="api-reference.html"><img src='../icons/up.png' |
| 28 | border='0' height='32' alt='Up One Level' width='32' /></A></td> |
| 29 | <td class='online-navigation'><a rel="next" title="10.26 distutils.command " |
| 30 | href="module-distutils.command.html"><img src='../icons/next.png' |
| 31 | border='0' height='32' alt='Next Page' width='32' /></A></td> |
| 32 | <td align="center" width="100%">Distributing Python Modules</td> |
| 33 | <td class='online-navigation'><img src='../icons/blank.png' |
| 34 | border='0' height='32' alt='' width='32' /></td> |
| 35 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' |
| 36 | border='0' height='32' alt='Module Index' width='32' /></a></td> |
| 37 | <td class='online-navigation'><a rel="index" title="Index" |
| 38 | href="genindex.html"><img src='../icons/index.png' |
| 39 | border='0' height='32' alt='Index' width='32' /></A></td> |
| 40 | </tr></table> |
| 41 | <div class='online-navigation'> |
| 42 | <b class="navlabel">Previous:</b> |
| 43 | <a class="sectref" rel="prev" href="module-distutils.version.html">10.24 distutils.version </A> |
| 44 | <b class="navlabel">Up:</b> |
| 45 | <a class="sectref" rel="parent" href="api-reference.html">10. API Reference</A> |
| 46 | <b class="navlabel">Next:</b> |
| 47 | <a class="sectref" rel="next" href="module-distutils.command.html">10.26 distutils.command </A> |
| 48 | </div> |
| 49 | <hr /></div> |
| 50 | </DIV> |
| 51 | <!--End of Navigation Panel--> |
| 52 | |
| 53 | <H1><A NAME="SECTION00102500000000000000000"> |
| 54 | 10.25 <tt class="module">distutils.cmd</tt> -- Abstract base class for Distutils commands</A> |
| 55 | </H1> |
| 56 | <A NAME="module-distutils.cmd"></A> |
| 57 | |
| 58 | <P> |
| 59 | This module supplies the abstract base class <tt class="class">Command</tt>. |
| 60 | |
| 61 | <P> |
| 62 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 63 | <td><nobr><b><span class="typelabel">class</span> <tt id='l2h-127' xml:id='l2h-127' class="class">Command</tt></b>(</nobr></td> |
| 64 | <td><var>dist</var>)</td></tr></table></dt> |
| 65 | <dd> |
| 66 | Abstract base class for defining command classes, the ``worker bees'' |
| 67 | of the Distutils. A useful analogy for command classes is to think of |
| 68 | them as subroutines with local variables called <var>options</var>. The |
| 69 | options are declared in <tt class="method">initialize_options()</tt> and defined |
| 70 | (given their final values) in <tt class="method">finalize_options()</tt>, both of |
| 71 | which must be defined by every command class. The distinction between |
| 72 | the two is necessary because option values might come from the outside |
| 73 | world (command line, config file, ...), and any options dependent on |
| 74 | other options must be computed after these outside influences have |
| 75 | been processed -- hence <tt class="method">finalize_options()</tt>. The body of the |
| 76 | subroutine, where it does all its work based on the values of its |
| 77 | options, is the <tt class="method">run()</tt> method, which must also be implemented |
| 78 | by every command class. |
| 79 | |
| 80 | <P> |
| 81 | The class constructor takes a single argument <var>dist</var>, a |
| 82 | <tt class="class">Distribution</tt> instance. |
| 83 | </dl> |
| 84 | |
| 85 | <P> |
| 86 | |
| 87 | <DIV CLASS="navigation"> |
| 88 | <div class='online-navigation'> |
| 89 | <p></p><hr /> |
| 90 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> |
| 91 | <tr> |
| 92 | <td class='online-navigation'><a rel="prev" title="10.24 distutils.version " |
| 93 | href="module-distutils.version.html"><img src='../icons/previous.png' |
| 94 | border='0' height='32' alt='Previous Page' width='32' /></A></td> |
| 95 | <td class='online-navigation'><a rel="parent" title="10. API Reference" |
| 96 | href="api-reference.html"><img src='../icons/up.png' |
| 97 | border='0' height='32' alt='Up One Level' width='32' /></A></td> |
| 98 | <td class='online-navigation'><a rel="next" title="10.26 distutils.command " |
| 99 | href="module-distutils.command.html"><img src='../icons/next.png' |
| 100 | border='0' height='32' alt='Next Page' width='32' /></A></td> |
| 101 | <td align="center" width="100%">Distributing Python Modules</td> |
| 102 | <td class='online-navigation'><img src='../icons/blank.png' |
| 103 | border='0' height='32' alt='' width='32' /></td> |
| 104 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' |
| 105 | border='0' height='32' alt='Module Index' width='32' /></a></td> |
| 106 | <td class='online-navigation'><a rel="index" title="Index" |
| 107 | href="genindex.html"><img src='../icons/index.png' |
| 108 | border='0' height='32' alt='Index' width='32' /></A></td> |
| 109 | </tr></table> |
| 110 | <div class='online-navigation'> |
| 111 | <b class="navlabel">Previous:</b> |
| 112 | <a class="sectref" rel="prev" href="module-distutils.version.html">10.24 distutils.version </A> |
| 113 | <b class="navlabel">Up:</b> |
| 114 | <a class="sectref" rel="parent" href="api-reference.html">10. API Reference</A> |
| 115 | <b class="navlabel">Next:</b> |
| 116 | <a class="sectref" rel="next" href="module-distutils.command.html">10.26 distutils.command </A> |
| 117 | </div> |
| 118 | </div> |
| 119 | <hr /> |
| 120 | <span class="release-info">Release 2.4.2, documentation updated on 28 September 2005.</span> |
| 121 | </DIV> |
| 122 | <!--End of Navigation Panel--> |
| 123 | <ADDRESS> |
| 124 | See <i><a href="about.html">About this document...</a></i> for information on suggesting changes. |
| 125 | </ADDRESS> |
| 126 | </BODY> |
| 127 | </HTML> |