index.lxp@lxpwrap=x8580_252ehtm.htm

来自「GUI Programming with Python」· HTM 代码 · 共 262 行

HTM
262
字号
    <table border="0" cellspacing="0" cellpadding="3" width="100%"><tr><td>    <div align="center" id="bldcontent">      <a href="../default.htm"><img src="../images/opendocs.png" width="63" height="76" border="0"></a>      <br>      <div class="symbol">Your OpenSource Publisher&#153;</div>    </div>      </td></tr></table>    <div align="center" class="author">      	<a href="../products.lxp">Products</a>	&nbsp;|&nbsp;	<a href="../wheretobuy.lxp">Where to buy</a>	&nbsp;|&nbsp;	<a href="../bookstore.lxp">Retailers</a>	&nbsp;|&nbsp;	<a href="../faq.lxp">FAQ</a>	&nbsp;|&nbsp;        <a href="../writeforus.lxp">Write for Us.</a>        &nbsp;|&nbsp;        <a href="#contact">Contact Us.</a>  </div>    <table border="0" cellspacing="3" cellpadding="0" width="100%"><tr><td width="100%">      <div class="content">        <table border="0" cellspacing="2" cellpadding="0" width="100%"><tr><td width="100%">          <div align="center"><H4 CLASS="AUTHOR"><A NAME="AEN5">Boudewijn Rempt</A><br><a href="../../https@secure.linuxports.com/opendocs/default.htm"><img src=odpyqt125.png></a><br>ISBN: 0-97003300-4-4<br><a href="../../https@secure.linuxports.com/opendocs/default.htm">Available from bookstores everywhere or you can order it here.</a><p>You can download the source files for the book <a href="pyqtsrc.tgz">(code / eps) here.</a><hr></div>                    <HTML><HEAD><TITLE>Creating Unix RPM packages</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.72"><LINKREL="HOME"TITLE="GUI Programming with Python: QT Edition"HREF="book1.htm"><LINKREL="UP"TITLE="Delivering your Application"HREF="c8349.htm"><LINKREL="PREVIOUS"TITLE="Starting with distutils."HREF="x8418.htm"><LINKREL="NEXT"TITLE="Windows installers"HREF="x8613.htm"></HEAD><BODYCLASS="SECT1"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">GUI Programming with Python: QT Edition</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><A accesskey="P" href="index.lxp@lxpwrap=x8418_252ehtm.htm">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 26. Delivering your Application</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><A accesskey="N" href="index.lxp@lxpwrap=x8613_252ehtm.htm">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1">Creating Unix RPM packages</A></H1><P>It is very easy to create installable RPM packages with      distutils. RPM is one of the two or three standard package      formats in the Unix world (the others are compressed or      gzipped tar archives and Debian packages) and most Linux      distributions support it.</P><P>RPM has strong support for dependency checking. This      means you can create a package that cannot be installed      unless certain other packages have been installed first.      You can even demand that those packages are of a certain version      number.</P><P>Creating an RPM takes just one command:</P><PRECLASS="SCREEN">boudewijn@maldar:~/doc/pyqt/ch18/kalam &#62; python setup.py bdist_rpm    </PRE><P>To ensure a really nice RPM, a few options should be      set. The best place to set these is in the <TTCLASS="FILENAME">setup.cfg</TT>      file:</P><PRECLASS="PROGRAMLISTING">[bdist_rpm]release = 1packager = Boudewijn Rempt &#60;boud@rempt.xs4all.nl&#62;doc_files = README        COPYINGprovides = kalamrequires = python pyqtdistribution_name = SuSE 7.2    </PRE><P>Most of the options merely provide some extra meta-data, but      the <TTCLASS="VARNAME">provides</TT> and <TTCLASS="VARNAME">requires</TT>      options are needed by RPM to do its dependency checking. In this      case, <SPANCLASS="APPLICATION">Kalam</SPAN> requires both      <SPANCLASS="APPLICATION">Python</SPAN> and PyQt to be present, which is      hardly a surprise! You can make these requirements more specific      by also asking for a version number:</P><PRECLASS="PROGRAMLISTING">requires = python-2.2 pyqt-2.5    </PRE><P>RPM is a complicated package format in      itself, and you can customize the installation process      considerably by using <TTCLASS="FILENAME">.spec</TT> file. The book      Maximum RPM (freely available at http://www.rpmdp.org/rpmbook/)      gives detailed information on writing these files. At the moment      distutils writes the file for you, based on the options in      <TTCLASS="FILENAME">setup.py</TT> and      <TTCLASS="FILENAME">setup.cfg</TT>. A future release of distutils      will support using your own <TTCLASS="FILENAME">.spec</TT>      files.</P></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><A accesskey="P" href="index.lxp@lxpwrap=x8418_252ehtm.htm">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><A accesskey="H" href="index.lxp@lxpwrap=book1_252ehtm">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><A accesskey="N" href="index.lxp@lxpwrap=x8613_252ehtm.htm">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Starting with distutils.</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><A accesskey="U" href="index.lxp@lxpwrap=c8349_252ehtm.htm">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Windows installers</TD></TR></TABLE></DIV></BODY></HTML>      </td>      </tr>      </table>      </td>    </tr>  </table>      

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?