Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 442

python-qt4-doc-4.10.3-3.mga4.noarch.rpm



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Installing PyQt4 &mdash; PyQt 4.10.3 Reference Guide</title>
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '4.10.3',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="shortcut icon" href="_static/logo_tn.ico"/>
    <link rel="top" title="PyQt 4.10.3 Reference Guide" href="index.html" />
    <link rel="next" title="PyQt4 and Python v3" href="python_v3.html" />
    <link rel="prev" title="Potential Incompatibilities with Earlier Versions" href="incompatibilities.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="python_v3.html" title="PyQt4 and Python v3"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="incompatibilities.html" title="Potential Incompatibilities with Earlier Versions"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">PyQt 4.10.3 Reference Guide</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="installing-pyqt4">
<h1>Installing PyQt4<a class="headerlink" href="#installing-pyqt4" title="Permalink to this headline">¶</a></h1>
<div class="section" id="downloading-sip">
<h2>Downloading SIP<a class="headerlink" href="#downloading-sip" title="Permalink to this headline">¶</a></h2>
<p>SIP must be installed before building and using PyQt4.  You can get the latest
release of the SIP source code from
<a class="reference external" href="http://www.riverbankcomputing.com/software/sip/download">http://www.riverbankcomputing.com/software/sip/download</a>.</p>
<p>The SIP documentation can be found at <a class="reference external" href="http://pyqt.sourceforge.net/Docs/sip4/">http://pyqt.sourceforge.net/Docs/sip4/</a>.</p>
</div>
<div class="section" id="downloading-pyqt4">
<h2>Downloading PyQt4<a class="headerlink" href="#downloading-pyqt4" title="Permalink to this headline">¶</a></h2>
<p>You can get the latest release of the GPL version of the PyQt4 source code from
<a class="reference external" href="http://www.riverbankcomputing.com/software/pyqt/download">http://www.riverbankcomputing.com/software/pyqt/download</a>.</p>
<p>If you are using the commercial version of PyQt4 then you should use the
download instructions which were sent to you when you made your purchase.  You
must also download your license file.</p>
</div>
<div class="section" id="configuring-pyqt4">
<h2>Configuring PyQt4<a class="headerlink" href="#configuring-pyqt4" title="Permalink to this headline">¶</a></h2>
<p>After unpacking the source package (either a <tt class="docutils literal"><span class="pre">.tar.gz</span></tt> or a <tt class="docutils literal"><span class="pre">.zip</span></tt> file
depending on your platform) you should then check for any <tt class="file docutils literal"><span class="pre">README</span></tt> files
that relate to your platform.</p>
<p>If you are using the commercial version of PyQt4 then you must copy your
license file to the <tt class="file docutils literal"><span class="pre">sip</span></tt> directory.</p>
<p>You need to make sure your environment variables are set properly for your
development environment.</p>
<p>In order to configure the build of PyQt4 you need to run either the
<strong class="program">configure-ng.py</strong> or the <strong class="program">configure.py</strong> script.</p>
<p><strong class="program">configure.py</strong> is the original configuration script that uses the
build system of SIP v4 (i.e. the <tt class="xref py py-mod docutils literal"><span class="pre">sip.sipconfig</span></tt> module).  It will be
supported for the life of PyQt4.</p>
<p><strong class="program">configure-ng.py</strong> is the new configuration script that uses Qt&#8217;s
<strong class="program">qmake</strong> program to do all the heavy lifting.  It has the following
advantages:</p>
<ul class="simple">
<li>a future version will support cross-compilation</li>
<li>it is the basis of PyQt5&#8217;s configuration script</li>
<li>generated Makefiles have an uninstall target</li>
<li>it will work with SIP v5 (which will have no build system).</li>
</ul>
<p>Users are encouraged to switch to using <strong class="program">configure-ng.py</strong> in order to
ease the future transition to SIP v5 and/or PyQt5.</p>
<div class="section" id="using-configure-ng-py">
<h3>Using <strong class="program">configure-ng.py</strong><a class="headerlink" href="#using-configure-ng-py" title="Permalink to this headline">¶</a></h3>
<p class="versionadded">
<span class="versionmodified">New in version 4.10.1.</span></p>
<p>The <strong class="program">configure-ng.py</strong> script is used to configure PyQt4 as follows:</p>
<div class="highlight-python"><pre>python configure-ng.py</pre>
</div>
<p>This assumes that the Python interpreter is on your path.  Something like the
following may be appropriate on Windows:</p>
<div class="highlight-python"><pre>c:\python33\python configure-ng.py</pre>
</div>
<p>If you have multiple versions of Python installed then make sure you use the
interpreter for which you wish to build PyQt4 for.</p>
<p>The full set of command line options is:</p>
<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--assume-shared">
<tt class="descname">--assume-shared</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure-ng.py--assume-shared" title="Permalink to this definition">¶</a></dt>
<dd><p>Normally Qt is checked to see if it has been built as shared libraries.
Some Linux distributions configure their Qt builds to make this check
unreliable.  This option ignores the result of the check and assumes that
Qt has been built as shared libraries.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--bindir">
<tt class="descname">--bindir</tt><tt class="descclassname"> &lt;DIR&gt;</tt><tt class="descclassname">, </tt><tt class="descname">-b</tt><tt class="descclassname"> &lt;DIR&gt;</tt><a class="headerlink" href="#cmdoption-configure-ng.py--bindir" title="Permalink to this definition">¶</a></dt>
<dd><p>The <strong class="program">pyuic4</strong>, <strong class="program">pyrcc4</strong> and <strong class="program">pylupdate4</strong>
utilities will be installed in the directory <tt class="docutils literal"><span class="pre">&lt;DIR&gt;</span></tt>.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--concatenate">
<tt class="descname">--concatenate</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">-c</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure-ng.py--concatenate" title="Permalink to this definition">¶</a></dt>
<dd><p>The C++ source files for a Python module will be concatenated.  This
results in significantly reduced compilation times.  Most, but not all,
C++ compilers can handle the large files that result.  See also the
<a class="reference internal" href="#cmdoption-configure-ng.py--concatenate-split"><em class="xref std std-option">--concatenate-split</em></a> option.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--concatenate-split">
<tt class="descname">--concatenate-split</tt><tt class="descclassname"> &lt;N&gt;</tt><tt class="descclassname">, </tt><tt class="descname">-j</tt><tt class="descclassname"> &lt;N&gt;</tt><a class="headerlink" href="#cmdoption-configure-ng.py--concatenate-split" title="Permalink to this definition">¶</a></dt>
<dd><p>If the <a class="reference internal" href="#cmdoption-configure-ng.py--concatenate"><em class="xref std std-option">--concatenate</em></a> option is used to concatenate the C++ source
files then this option determines how many files are created.  The default
is 1.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--configuration">
<tt class="descname">--configuration</tt><tt class="descclassname"> &lt;FILE&gt;</tt><a class="headerlink" href="#cmdoption-configure-ng.py--configuration" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">&lt;FILE&gt;</span></tt> contains the configuration of the PyQt4 build to be used instead
of dynamically introspecting the system and is used when cross-compiling.
The format of <tt class="docutils literal"><span class="pre">&lt;FILE&gt;</span></tt> will be documented in a later version when
cross-compilation is fully supported.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--confirm-license">
<tt class="descname">--confirm-license</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure-ng.py--confirm-license" title="Permalink to this definition">¶</a></dt>
<dd><p>Using this confirms that you accept the terms of the PyQt4 license.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--consolidate">
<tt class="descname">--consolidate</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">-g</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure-ng.py--consolidate" title="Permalink to this definition">¶</a></dt>
<dd><p>Normally each PyQt4 module (except for the <tt class="xref py py-mod docutils literal"><span class="pre">Qt</span></tt> module) is
linked against the corresponding Qt library.  This option creates a module
called <tt class="xref py py-mod docutils literal"><span class="pre">_qt</span></tt> which is linked against all the required Qt
libraries and the other modules are stub modules that populate their module
dictionaries from this one.  This is useful when linking against static Qt
libraries to eliminate the need to distribute the Qt libraries while
minimising the memory footprint of the PyQt4 modules.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--dbus">
<tt class="descname">--dbus</tt><tt class="descclassname"> &lt;DIR&gt;</tt><tt class="descclassname">, </tt><tt class="descname">-s</tt><tt class="descclassname"> &lt;DIR&gt;</tt><a class="headerlink" href="#cmdoption-configure-ng.py--dbus" title="Permalink to this definition">¶</a></dt>
<dd><p>The <tt class="file docutils literal"><span class="pre">dbus-python.h</span></tt> header file of the dbus-python package can be
found in the directory <tt class="docutils literal"><span class="pre">&lt;DIR&gt;/dbus</span></tt>.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--debug">
<tt class="descname">--debug</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">-u</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure-ng.py--debug" title="Permalink to this definition">¶</a></dt>
<dd><p>The PyQt4 modules will be built with debugging symbols.  On Windows this
requires that a debug version of Python is installed.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--designer-plugindir">
<tt class="descname">--designer-plugindir</tt><tt class="descclassname"> &lt;DIR&gt;</tt><a class="headerlink" href="#cmdoption-configure-ng.py--designer-plugindir" title="Permalink to this definition">¶</a></dt>
<dd><p>The Python plugin for Qt Designer will be installed in the directory
<tt class="docutils literal"><span class="pre">&lt;DIR&gt;</span></tt>.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--destdir">
<tt class="descname">--destdir</tt><tt class="descclassname"> &lt;DIR&gt;</tt><tt class="descclassname">, </tt><tt class="descname">-d</tt><tt class="descclassname"> &lt;DIR&gt;</tt><a class="headerlink" href="#cmdoption-configure-ng.py--destdir" title="Permalink to this definition">¶</a></dt>
<dd><p>The PyQt4 Python package will be installed in the directory <tt class="docutils literal"><span class="pre">&lt;DIR&gt;</span></tt>.  The
default is the Python installation&#8217;s <tt class="file docutils literal"><span class="pre">site-packages</span></tt> directory.  If
you use this option then the <span class="target" id="index-0"></span><tt class="xref std std-envvar docutils literal"><span class="pre">PYTHONPATH</span></tt> environment variable must
include <tt class="docutils literal"><span class="pre">&lt;DIR&gt;</span></tt>.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--enable">
<tt class="descname">--enable</tt><tt class="descclassname"> &lt;MODULE&gt;</tt><tt class="descclassname">, </tt><tt class="descname">-e</tt><tt class="descclassname"> &lt;MODULE&gt;</tt><a class="headerlink" href="#cmdoption-configure-ng.py--enable" title="Permalink to this definition">¶</a></dt>
<dd><p>Normally all PyQt4 modules are enabled and are built if the corresponding
Qt library can be found.  Using this option only those modules specifically
enabled will be checked for and built.  The option may be specified any
number of times.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--help">
<tt class="descname">--help</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">-h</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure-ng.py--help" title="Permalink to this definition">¶</a></dt>
<dd><p>Display a help message.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--no-deprecated">
<tt class="descname">--no-deprecated</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure-ng.py--no-deprecated" title="Permalink to this definition">¶</a></dt>
<dd><p>All Qt v4 features that have been deprecated in Qt v5 will be disabled.
This is useful when porting PyQt4 applications to PyQt5.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--no-designer-plugin">
<tt class="descname">--no-designer-plugin</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure-ng.py--no-designer-plugin" title="Permalink to this definition">¶</a></dt>
<dd><p>The Qt Designer plugin will not be built.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--no-docstrings">
<tt class="descname">--no-docstrings</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure-ng.py--no-docstrings" title="Permalink to this definition">¶</a></dt>
<dd><p>The PyQt4 modules will not contain automatically generated docstrings.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--no-qsci-api">
<tt class="descname">--no-qsci-api</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure-ng.py--no-qsci-api" title="Permalink to this definition">¶</a></dt>
<dd><p>The <tt class="file docutils literal"><span class="pre">PyQt4.api</span></tt> QScintilla API file is not installed even if
QScintilla does appear to be installed.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--no-sip-files">
<tt class="descname">--no-sip-files</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure-ng.py--no-sip-files" title="Permalink to this definition">¶</a></dt>
<dd><p>The <tt class="docutils literal"><span class="pre">.sip</span></tt> files for the PyQt4 modules will not be installed.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--no-timestamp">
<tt class="descname">--no-timestamp</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">-T</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure-ng.py--no-timestamp" title="Permalink to this definition">¶</a></dt>
<dd><p>Normally the header comments of each generated C/C++ source file includes
a timestamp corresponding to when the file was generated.  This option
suppresses the inclusion of the timestamp.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--plugin">
<tt class="descname">--plugin</tt><tt class="descclassname"> &lt;PLUGIN&gt;</tt><tt class="descclassname">, </tt><tt class="descname">-t</tt><tt class="descclassname"> &lt;PLUGIN&gt;</tt><a class="headerlink" href="#cmdoption-configure-ng.py--plugin" title="Permalink to this definition">¶</a></dt>
<dd><p>If Qt has been built as static libraries then the static plugin
<tt class="docutils literal"><span class="pre">&lt;PLUGIN&gt;</span></tt> will be linked with the appropriate PyQt4 module.  The option
may be specified any number of times.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--protected-is-public">
<tt class="descname">--protected-is-public</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure-ng.py--protected-is-public" title="Permalink to this definition">¶</a></dt>
<dd><p>On certain platforms the size of PyQt4 modules can be significantly reduced
by redefining the C++ <tt class="docutils literal"><span class="pre">protected</span></tt> keyword as <tt class="docutils literal"><span class="pre">public</span></tt> during
compilation.  This option enables this behaviour and is the default on
Linux and MacOS/X.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--protected-not-public">
<tt class="descname">--protected-not-public</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure-ng.py--protected-not-public" title="Permalink to this definition">¶</a></dt>
<dd><p>The default redefinition of <tt class="docutils literal"><span class="pre">protected</span></tt> to <tt class="docutils literal"><span class="pre">public</span></tt> during compilation
on Linux and MacOS/X is disabled.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--pyuic4-interpreter">
<tt class="descname">--pyuic4-interpreter</tt><tt class="descclassname"> &lt;FILE&gt;</tt><a class="headerlink" href="#cmdoption-configure-ng.py--pyuic4-interpreter" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">&lt;FILE&gt;</span></tt> is the name of the Python interpreter used in the pyuic4
wrapper.  The default is platform dependent.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--qmake">
<tt class="descname">--qmake</tt><tt class="descclassname"> &lt;FILE&gt;</tt><tt class="descclassname">, </tt><tt class="descname">-q</tt><tt class="descclassname"> &lt;FILE&gt;</tt><a class="headerlink" href="#cmdoption-configure-ng.py--qmake" title="Permalink to this definition">¶</a></dt>
<dd><p>Qt&#8217;s <strong class="program">qmake</strong> program is used to determine how your Qt installation
is laid out.  Normally <strong class="program">qmake</strong> is found on your <span class="target" id="index-1"></span><tt class="xref std std-envvar docutils literal"><span class="pre">PATH</span></tt>.
This option can be used to specify a particular instance of
<strong class="program">qmake</strong> to use.  This option is not available on Windows where
<strong class="program">qmake</strong> must be on <span class="target" id="index-2"></span><tt class="xref std std-envvar docutils literal"><span class="pre">PATH</span></tt>.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--qsci-api">
<tt class="descname">--qsci-api</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">-a</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure-ng.py--qsci-api" title="Permalink to this definition">¶</a></dt>
<dd><p>The <tt class="file docutils literal"><span class="pre">PyQt4.api</span></tt> QScintilla API file is installed even if QScintilla
does not appear to be installed.  This option is implied if the
<a class="reference internal" href="#cmdoption-configure-ng.py--qsci-api-destdir"><em class="xref std std-option">--qsci-api-destdir</em></a> option is specified.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--qsci-api-destdir">
<tt class="descname">--qsci-api-destdir</tt><tt class="descclassname"> &lt;DIR&gt;</tt><tt class="descclassname">, </tt><tt class="descname">-n</tt><tt class="descclassname"> &lt;DIR&gt;</tt><a class="headerlink" href="#cmdoption-configure-ng.py--qsci-api-destdir" title="Permalink to this definition">¶</a></dt>
<dd><p>The QScintilla API file will be installed in the <tt class="file docutils literal"><span class="pre">python</span></tt>
subdirectory of the <tt class="file docutils literal"><span class="pre">api</span></tt> subdirectory of the directory <tt class="docutils literal"><span class="pre">&lt;DIR&gt;</span></tt>.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--sip">
<tt class="descname">--sip</tt><tt class="descclassname"> &lt;FILE&gt;</tt><a class="headerlink" href="#cmdoption-configure-ng.py--sip" title="Permalink to this definition">¶</a></dt>
<dd><p>The <strong class="program">sip</strong> program is used to generate PyQt4&#8217;s C++ source code.
Normally <strong class="program">sip</strong> is found on your <span class="target" id="index-3"></span><tt class="xref std std-envvar docutils literal"><span class="pre">PATH</span></tt>.  This option can
be used to specify a particular instance of <strong class="program">sip</strong> to use.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--sip-incdir">
<tt class="descname">--sip-incdir</tt><tt class="descclassname"> &lt;DIR&gt;</tt><a class="headerlink" href="#cmdoption-configure-ng.py--sip-incdir" title="Permalink to this definition">¶</a></dt>
<dd><p>The <tt class="docutils literal"><span class="pre">sip.h</span></tt> header file can be found in the directory <tt class="docutils literal"><span class="pre">&lt;DIR&gt;</span></tt>.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--sipdir">
<tt class="descname">--sipdir</tt><tt class="descclassname"> &lt;DIR&gt;</tt><tt class="descclassname">, </tt><tt class="descname">-v</tt><tt class="descclassname"> &lt;DIR&gt;</tt><a class="headerlink" href="#cmdoption-configure-ng.py--sipdir" title="Permalink to this definition">¶</a></dt>
<dd><p>The <tt class="docutils literal"><span class="pre">.sip</span></tt> files for the PyQt4 modules will be installed in the directory
<tt class="docutils literal"><span class="pre">&lt;DIR&gt;</span></tt>.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--spec">
<tt class="descname">--spec</tt><tt class="descclassname"> &lt;SPEC&gt;</tt><a class="headerlink" href="#cmdoption-configure-ng.py--spec" title="Permalink to this definition">¶</a></dt>
<dd><p>The argument <tt class="docutils literal"><span class="pre">-spec</span> <span class="pre">SPEC</span></tt> will be passed to <strong class="program">qmake</strong>.  The
default behaviour is platform specific.  On Windows
<strong class="program">configure-ng.py</strong> will choose the value that is correct for the
version of Python that is being used.  (However if you have built Python
yourself then you may need to explicitly specify <tt class="docutils literal"><span class="pre">&lt;SPEC&gt;</span></tt>.)  On MacOS
<strong class="program">configure-ng.py</strong> will try and avoid <tt class="docutils literal"><span class="pre">macx-xcode</span></tt> if possible.)</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--static">
<tt class="descname">--static</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">-k</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure-ng.py--static" title="Permalink to this definition">¶</a></dt>
<dd><p>The PyQt4 modules will be built as static libraries.  This is useful when
building a custom interpreter with the PyQt4 modules built in to the
interpreter.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--trace">
<tt class="descname">--trace</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">-r</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure-ng.py--trace" title="Permalink to this definition">¶</a></dt>
<dd><p>The generated PyQt4 modules contain additional tracing code that is enabled
using SIP&#8217;s <tt class="xref py py-func docutils literal"><span class="pre">sip.settracemask()</span></tt> function.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--vendorid">
<tt class="descname">--vendorid</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">-i</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure-ng.py--vendorid" title="Permalink to this definition">¶</a></dt>
<dd><p>The checking of signed Python interpreters using the <a class="reference external" href="http://www.riverbankcomputing.com/software/vendorid/">VendorID</a> package is
enabled.  See also the <a class="reference internal" href="#cmdoption-configure-ng.py--vendorid-incdir"><em class="xref std std-option">--vendorid-incdir</em></a> and
<a class="reference internal" href="#cmdoption-configure-ng.py--vendorid-libdir"><em class="xref std std-option">--vendorid-libdir</em></a> options and <a class="reference internal" href="deploy_commercial.html#ref-deploy-commercial"><em>Deploying Commercial PyQt4 Applications</em></a>.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--vendorid-incdir">
<tt class="descname">--vendorid-incdir</tt><tt class="descclassname"> &lt;DIR&gt;</tt><tt class="descclassname">, </tt><tt class="descname">-l</tt><tt class="descclassname"> &lt;DIR&gt;</tt><a class="headerlink" href="#cmdoption-configure-ng.py--vendorid-incdir" title="Permalink to this definition">¶</a></dt>
<dd><p>The header file of the VendorID package can be found in the directory
<tt class="docutils literal"><span class="pre">&lt;DIR&gt;</span></tt>.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--vendorid-libdir">
<tt class="descname">--vendorid-libdir</tt><tt class="descclassname"> &lt;DIR&gt;</tt><tt class="descclassname">, </tt><tt class="descname">-m</tt><tt class="descclassname"> &lt;DIR&gt;</tt><a class="headerlink" href="#cmdoption-configure-ng.py--vendorid-libdir" title="Permalink to this definition">¶</a></dt>
<dd><p>The library of the VendorID package can be found in the directory
<tt class="docutils literal"><span class="pre">&lt;DIR&gt;</span></tt>.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--verbose">
<tt class="descname">--verbose</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">-w</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure-ng.py--verbose" title="Permalink to this definition">¶</a></dt>
<dd><p>Compiler commands and any output issued during configuration is displayed
instead of being suppressed.  Use this if <strong class="program">configure-ng.py</strong> is
having problems to see what exactly is going wrong.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure-ng.py--version">
<tt class="descname">--version</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure-ng.py--version" title="Permalink to this definition">¶</a></dt>
<dd><p>Display the PyQt4 version number.</p>
</dd></dl>

<p>Any remaining command line arguments are expected to be in the form
<tt class="docutils literal"><span class="pre">name=value</span></tt> or <tt class="docutils literal"><span class="pre">name+=value</span></tt>.  Such arguments are added to any
<strong class="program">qmake</strong> <tt class="docutils literal"><span class="pre">.pro</span></tt> file created by <strong class="program">configure-ng.py</strong>.</p>
</div>
<div class="section" id="using-configure-py">
<h3>Using <strong class="program">configure.py</strong><a class="headerlink" href="#using-configure-py" title="Permalink to this headline">¶</a></h3>
<p>The <strong class="program">configure.py</strong> script is used to configure PyQt4 as follows:</p>
<div class="highlight-python"><pre>python configure.py</pre>
</div>
<p>This assumes that the Python interpreter is on your path.  Something like the
following may be appropriate on Windows:</p>
<div class="highlight-python"><pre>c:\python33\python configure.py</pre>
</div>
<p>If you have multiple versions of Python installed then make sure you use the
interpreter for which you wish to build PyQt4 for.</p>
<p>The full set of command line options is:</p>
<dl class="cmdoption">
<dt id="cmdoption-configure.py--assume-shared">
<tt class="descname">--assume-shared</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py--assume-shared" title="Permalink to this definition">¶</a></dt>
<dd><p>Normally Qt is checked to see if it has been built as shared libraries.
Some Linux distributions configure their Qt builds to make this check
unreliable.  This option ignores the result of the check and assumes that
Qt has been built as shared libraries.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--bindir">
<tt class="descname">--bindir</tt><tt class="descclassname"> &lt;DIR&gt;</tt><tt class="descclassname">, </tt><tt class="descname">-b</tt><tt class="descclassname"> &lt;DIR&gt;</tt><a class="headerlink" href="#cmdoption-configure.py--bindir" title="Permalink to this definition">¶</a></dt>
<dd><p>The <strong class="program">pyuic4</strong>, <strong class="program">pyrcc4</strong> and <strong class="program">pylupdate4</strong>
utilities will be installed in the directory <tt class="docutils literal"><span class="pre">&lt;DIR&gt;</span></tt>.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--concatenate">
<tt class="descname">--concatenate</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">-c</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py--concatenate" title="Permalink to this definition">¶</a></dt>
<dd><p>The C++ source files for a Python module will be concatenated.  This
results in significantly reduced compilation times.  Most, but not all,
C++ compilers can handle the large files that result.  See also the
<a class="reference internal" href="#cmdoption-configure.py--concatenate-split"><em class="xref std std-option">--concatenate-split</em></a> option.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--concatenate-split">
<tt class="descname">--concatenate-split</tt><tt class="descclassname"> &lt;N&gt;</tt><tt class="descclassname">, </tt><tt class="descname">-j</tt><tt class="descclassname"> &lt;N&gt;</tt><a class="headerlink" href="#cmdoption-configure.py--concatenate-split" title="Permalink to this definition">¶</a></dt>
<dd><p>If the <a class="reference internal" href="#cmdoption-configure.py--concatenate"><em class="xref std std-option">--concatenate</em></a> option is used to concatenate the C++ source
files then this option determines how many files are created.  The default
is 1.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--confirm-license">
<tt class="descname">--confirm-license</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py--confirm-license" title="Permalink to this definition">¶</a></dt>
<dd><p>Using this confirms that you accept the terms of the PyQt4 license.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--consolidate">
<tt class="descname">--consolidate</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">-g</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py--consolidate" title="Permalink to this definition">¶</a></dt>
<dd><p>Normally each PyQt4 module (except for the <tt class="xref py py-mod docutils literal"><span class="pre">Qt</span></tt> module) is
linked against the corresponding Qt library.  This option creates a module
called <tt class="xref py py-mod docutils literal"><span class="pre">_qt</span></tt> which is linked against all the required Qt
libraries and the other modules are stub modules that populate their module
dictionaries from this one.  This is useful when linking against static Qt
libraries to eliminate the need to distribute the Qt libraries while
minimising the memory footprint of the PyQt4 modules.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--dbus">
<tt class="descname">--dbus</tt><tt class="descclassname"> &lt;DIR&gt;</tt><tt class="descclassname">, </tt><tt class="descname">-s</tt><tt class="descclassname"> &lt;DIR&gt;</tt><a class="headerlink" href="#cmdoption-configure.py--dbus" title="Permalink to this definition">¶</a></dt>
<dd><p>The <tt class="file docutils literal"><span class="pre">dbus-python.h</span></tt> header file of the dbus-python package can be
found in the directory <tt class="docutils literal"><span class="pre">&lt;DIR&gt;/dbus</span></tt>.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--debug">
<tt class="descname">--debug</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">-u</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py--debug" title="Permalink to this definition">¶</a></dt>
<dd><p>The PyQt4 modules will be built with debugging symbols.  On Windows this
requires that a debug version of Python is installed.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--destdir">
<tt class="descname">--destdir</tt><tt class="descclassname"> &lt;DIR&gt;</tt><tt class="descclassname">, </tt><tt class="descname">-d</tt><tt class="descclassname"> &lt;DIR&gt;</tt><a class="headerlink" href="#cmdoption-configure.py--destdir" title="Permalink to this definition">¶</a></dt>
<dd><p>The PyQt4 Python package will be installed in the directory <tt class="docutils literal"><span class="pre">&lt;DIR&gt;</span></tt>.  The
default is the Python installation&#8217;s <tt class="file docutils literal"><span class="pre">site-packages</span></tt> directory.  If
you use this option then the <span class="target" id="index-4"></span><tt class="xref std std-envvar docutils literal"><span class="pre">PYTHONPATH</span></tt> environment variable must
include <tt class="docutils literal"><span class="pre">&lt;DIR&gt;</span></tt>.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--enable">
<tt class="descname">--enable</tt><tt class="descclassname"> &lt;MODULE&gt;</tt><tt class="descclassname">, </tt><tt class="descname">-e</tt><tt class="descclassname"> &lt;MODULE&gt;</tt><a class="headerlink" href="#cmdoption-configure.py--enable" title="Permalink to this definition">¶</a></dt>
<dd><p>Normally all PyQt4 modules are enabled and are built if the corresponding
Qt library can be found.  Using this option only those modules specifically
enabled will be checked for and built.  The option may be specified any
number of times.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--help">
<tt class="descname">--help</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">-h</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py--help" title="Permalink to this definition">¶</a></dt>
<dd><p>Display a help message.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--no-deprecated">
<tt class="descname">--no-deprecated</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py--no-deprecated" title="Permalink to this definition">¶</a></dt>
<dd><p>All Qt v4 features that have been deprecated in Qt v5 will be disabled.
This is useful when porting PyQt4 applications to PyQt5.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--no-designer-plugin">
<tt class="descname">--no-designer-plugin</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py--no-designer-plugin" title="Permalink to this definition">¶</a></dt>
<dd><p>The Qt Designer plugin will not be built.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--no-docstrings">
<tt class="descname">--no-docstrings</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py--no-docstrings" title="Permalink to this definition">¶</a></dt>
<dd><p>The PyQt4 modules will not contain automatically generated docstrings.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--no-qsci-api">
<tt class="descname">--no-qsci-api</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py--no-qsci-api" title="Permalink to this definition">¶</a></dt>
<dd><p>The <tt class="file docutils literal"><span class="pre">PyQt4.api</span></tt> QScintilla API file is not installed even if
QScintilla does appear to be installed.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--no-sip-files">
<tt class="descname">--no-sip-files</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py--no-sip-files" title="Permalink to this definition">¶</a></dt>
<dd><p>The <tt class="docutils literal"><span class="pre">.sip</span></tt> files for the PyQt4 modules will not be installed.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--no-timestamp">
<tt class="descname">--no-timestamp</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">-T</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py--no-timestamp" title="Permalink to this definition">¶</a></dt>
<dd><p>Normally the header comments of each generated C/C++ source file includes
a timestamp corresponding to when the file was generated.  This option
suppresses the inclusion of the timestamp.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--plugin">
<tt class="descname">--plugin</tt><tt class="descclassname"> &lt;PLUGIN&gt;</tt><tt class="descclassname">, </tt><tt class="descname">-t</tt><tt class="descclassname"> &lt;PLUGIN&gt;</tt><a class="headerlink" href="#cmdoption-configure.py--plugin" title="Permalink to this definition">¶</a></dt>
<dd><p>If Qt has been built as static libraries then the static plugin
<tt class="docutils literal"><span class="pre">&lt;PLUGIN&gt;</span></tt> will be linked with the appropriate PyQt4 module.  The option
may be specified any number of times.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--plugin-destdir">
<tt class="descname">--plugin-destdir</tt><tt class="descclassname"> &lt;DIR&gt;</tt><tt class="descclassname">, </tt><tt class="descname">-p</tt><tt class="descclassname"> &lt;DIR&gt;</tt><a class="headerlink" href="#cmdoption-configure.py--plugin-destdir" title="Permalink to this definition">¶</a></dt>
<dd><p>The Qt Designer plugin that manages plugins implemented in Python will be
installed in the <tt class="file docutils literal"><span class="pre">designer</span></tt> subdirectory of the directory <tt class="docutils literal"><span class="pre">&lt;DIR&gt;</span></tt>.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--protected-is-public">
<tt class="descname">--protected-is-public</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py--protected-is-public" title="Permalink to this definition">¶</a></dt>
<dd><p>On certain platforms the size of PyQt4 modules can be significantly reduced
by redefining the C++ <tt class="docutils literal"><span class="pre">protected</span></tt> keyword as <tt class="docutils literal"><span class="pre">public</span></tt> during
compilation.  This option enables this behaviour and is the default on
Linux and MacOS/X.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--protected-not-public">
<tt class="descname">--protected-not-public</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py--protected-not-public" title="Permalink to this definition">¶</a></dt>
<dd><p>The default redefinition of <tt class="docutils literal"><span class="pre">protected</span></tt> to <tt class="docutils literal"><span class="pre">public</span></tt> during compilation
on Linux and MacOS/X is disabled.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--qmake">
<tt class="descname">--qmake</tt><tt class="descclassname"> &lt;FILE&gt;</tt><tt class="descclassname">, </tt><tt class="descname">-q</tt><tt class="descclassname"> &lt;FILE&gt;</tt><a class="headerlink" href="#cmdoption-configure.py--qmake" title="Permalink to this definition">¶</a></dt>
<dd><p>Qt&#8217;s <strong class="program">qmake</strong> program is used to determine how your Qt installation
is laid out.  Normally <strong class="program">qmake</strong> is found on your <span class="target" id="index-5"></span><tt class="xref std std-envvar docutils literal"><span class="pre">PATH</span></tt>.
This option can be used to specify a particular instance of
<strong class="program">qmake</strong> to use.  This option is not available on Windows.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--qsci-api">
<tt class="descname">--qsci-api</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">-a</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py--qsci-api" title="Permalink to this definition">¶</a></dt>
<dd><p>The <tt class="file docutils literal"><span class="pre">PyQt4.api</span></tt> QScintilla API file is installed even if QScintilla
does not appear to be installed.  This option is implied if the
<a class="reference internal" href="#cmdoption-configure.py--qsci-api-destdir"><em class="xref std std-option">--qsci-api-destdir</em></a> option is specified.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--qsci-api-destdir">
<tt class="descname">--qsci-api-destdir</tt><tt class="descclassname"> &lt;DIR&gt;</tt><tt class="descclassname">, </tt><tt class="descname">-n</tt><tt class="descclassname"> &lt;DIR&gt;</tt><a class="headerlink" href="#cmdoption-configure.py--qsci-api-destdir" title="Permalink to this definition">¶</a></dt>
<dd><p>The QScintilla API file will be installed in the <tt class="file docutils literal"><span class="pre">python</span></tt>
subdirectory of the <tt class="file docutils literal"><span class="pre">api</span></tt> subdirectory of the directory <tt class="docutils literal"><span class="pre">&lt;DIR&gt;</span></tt>.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--sipdir">
<tt class="descname">--sipdir</tt><tt class="descclassname"> &lt;DIR&gt;</tt><tt class="descclassname">, </tt><tt class="descname">-v</tt><tt class="descclassname"> &lt;DIR&gt;</tt><a class="headerlink" href="#cmdoption-configure.py--sipdir" title="Permalink to this definition">¶</a></dt>
<dd><p>The <tt class="docutils literal"><span class="pre">.sip</span></tt> files for the PyQt4 modules will be installed in the directory
<tt class="docutils literal"><span class="pre">&lt;DIR&gt;</span></tt>.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--static">
<tt class="descname">--static</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">-k</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py--static" title="Permalink to this definition">¶</a></dt>
<dd><p>The PyQt4 modules will be built as static libraries.  This is useful when
building a custom interpreter with the PyQt4 modules built in to the
interpreter.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--trace">
<tt class="descname">--trace</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">-r</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py--trace" title="Permalink to this definition">¶</a></dt>
<dd><p>The generated PyQt4 modules contain additional tracing code that is enabled
using SIP&#8217;s <tt class="xref py py-func docutils literal"><span class="pre">sip.settracemask()</span></tt> function.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--use-arch">
<tt class="descname">--use-arch</tt><tt class="descclassname"> &lt;ARCH&gt;</tt><a class="headerlink" href="#cmdoption-configure.py--use-arch" title="Permalink to this definition">¶</a></dt>
<dd><p>When <strong class="program">pyuic4</strong> calls the Python interpreter on MacOS it will be run
using the architecture <tt class="docutils literal"><span class="pre">&lt;ARCH&gt;</span></tt>.  See the section <a class="reference internal" href="#ref-macos"><em>Configuring SIP and PyQt4 for MacOS</em></a>.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--vendorid">
<tt class="descname">--vendorid</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">-i</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py--vendorid" title="Permalink to this definition">¶</a></dt>
<dd><p>The checking of signed Python interpreters using the <a class="reference external" href="http://www.riverbankcomputing.com/software/vendorid/">VendorID</a> package is
enabled.  See also the <a class="reference internal" href="#cmdoption-configure.py--vendorid-incdir"><em class="xref std std-option">--vendorid-incdir</em></a> and
<a class="reference internal" href="#cmdoption-configure.py--vendorid-libdir"><em class="xref std std-option">--vendorid-libdir</em></a> options and <a class="reference internal" href="deploy_commercial.html#ref-deploy-commercial"><em>Deploying Commercial PyQt4 Applications</em></a>.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--vendorid-incdir">
<tt class="descname">--vendorid-incdir</tt><tt class="descclassname"> &lt;DIR&gt;</tt><tt class="descclassname">, </tt><tt class="descname">-l</tt><tt class="descclassname"> &lt;DIR&gt;</tt><a class="headerlink" href="#cmdoption-configure.py--vendorid-incdir" title="Permalink to this definition">¶</a></dt>
<dd><p>The header file of the VendorID package can be found in the directory
<tt class="docutils literal"><span class="pre">&lt;DIR&gt;</span></tt>.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--vendorid-libdir">
<tt class="descname">--vendorid-libdir</tt><tt class="descclassname"> &lt;DIR&gt;</tt><tt class="descclassname">, </tt><tt class="descname">-m</tt><tt class="descclassname"> &lt;DIR&gt;</tt><a class="headerlink" href="#cmdoption-configure.py--vendorid-libdir" title="Permalink to this definition">¶</a></dt>
<dd><p>The library of the VendorID package can be found in the directory
<tt class="docutils literal"><span class="pre">&lt;DIR&gt;</span></tt>.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--verbose">
<tt class="descname">--verbose</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">-w</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py--verbose" title="Permalink to this definition">¶</a></dt>
<dd><p>Compiler commands and any output issued during configuration is displayed
instead of being suppressed.  Use this if <strong class="program">configure.py</strong> is having
problems to see what exactly is going wrong.</p>
</dd></dl>

<dl class="cmdoption">
<dt id="cmdoption-configure.py--version">
<tt class="descname">--version</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py--version" title="Permalink to this definition">¶</a></dt>
<dd><p>Display the PyQt4 version number.</p>
</dd></dl>

</div>
<div class="section" id="configuring-sip-and-pyqt4-for-macos">
<span id="ref-macos"></span><h3>Configuring SIP and PyQt4 for MacOS<a class="headerlink" href="#configuring-sip-and-pyqt4-for-macos" title="Permalink to this headline">¶</a></h3>
<p>Note that this section only applies if you are using the
<strong class="program">configure.py</strong> script to configure PyQt4.  The
<strong class="program">configure-ng.py</strong> script leaves it to Qt&#8217;s <strong class="program">qmake</strong> program to
handle the details.  <strong class="program">configure-ng.py</strong> does not support the creation
of universal binaries.</p>
<p>Building applications for MacOS can be a complex process.  Typically the
following need to be taken into account:</p>
<ul class="simple">
<li>the architectures (i.e. i386, x86_64, ppc) that you want to support</li>
<li>the earliest version of MacOS you want to support (i.e. the deployment
target)</li>
<li>the version of the SDK you want to use.</li>
</ul>
<p>If you are using a binary installer for Python and/or Qt then you also need to
consider how they have been built regarding the above, and what bugs they have.</p>
<p>SIP&#8217;s and PyQt4&#8217;s <strong class="program">configure.py</strong> scripts provide the necessary command
line options to allow the correct configurations to be specified - the trick is
to work out which options to use depending on the versions of Python and Qt you
have installed.</p>
<p>SIP provides the following command line options to its <strong class="program">configure.py</strong>
script.</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">--arch</span> <span class="pre">&lt;ARCH&gt;</span></tt> specifies the target architecture and may be specified a
number of times.</li>
<li><tt class="docutils literal"><span class="pre">--universal</span></tt> is a shortcut for <tt class="docutils literal"><span class="pre">--arch</span> <span class="pre">i386</span> <span class="pre">--arch</span> <span class="pre">ppc</span></tt>.</li>
<li><tt class="docutils literal"><span class="pre">--deployment-target</span> <span class="pre">&lt;VERSION&gt;</span></tt> specifies the earliest version of MacOS you
want to support.  This sets the <span class="target" id="index-6"></span><tt class="xref std std-envvar docutils literal"><span class="pre">MACOSX_DEPLOYMENT_TARGET</span></tt>
environment variable and should be used rather than setting the environment
variable in the shell (to work around bugs in some versions of Python).</li>
<li><tt class="docutils literal"><span class="pre">--sdk</span> <span class="pre">&lt;SDK&gt;</span></tt> specifies the SDK to use.</li>
</ul>
<p>PyQt4 provides the <a class="reference internal" href="#cmdoption-configure.py--use-arch"><em class="xref std std-option">--use-arch</em></a> option that
specifies which architecture certain PyQt4 tools (actually only
<strong class="program">pyuic4</strong> at the moment) will use when running Python.  For example, if
your Qt installation is 32 bits, and your Python installation is 32 bits and
64 bits then you will need to specify <tt class="docutils literal"><span class="pre">--use-arch</span> <span class="pre">i386</span></tt> to ensure that
<strong class="program">pyuic4</strong> runs the 32 bit version of Python.</p>
</div>
</div>
<div class="section" id="building-pyqt4">
<h2>Building PyQt4<a class="headerlink" href="#building-pyqt4" title="Permalink to this headline">¶</a></h2>
<p>The next step is to build PyQt4 by running your platform&#8217;s <strong class="program">make</strong>
command.  For example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">make</span>
</pre></div>
</div>
<p>The final step is to install PyQt4 by running the following command:</p>
<div class="highlight-python"><pre>make install</pre>
</div>
<p>(Depending on your system you may require root or administrator privileges.)</p>
<p>This will install the various PyQt4 components.</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="index.html">
              <img class="logo" src="_static/logo.png" alt="Logo"/>
            </a></p>
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Installing PyQt4</a><ul>
<li><a class="reference internal" href="#downloading-sip">Downloading SIP</a></li>
<li><a class="reference internal" href="#downloading-pyqt4">Downloading PyQt4</a></li>
<li><a class="reference internal" href="#configuring-pyqt4">Configuring PyQt4</a><ul>
<li><a class="reference internal" href="#using-configure-ng-py">Using <strong class="program">configure-ng.py</strong></a></li>
<li><a class="reference internal" href="#using-configure-py">Using <strong class="program">configure.py</strong></a></li>
<li><a class="reference internal" href="#configuring-sip-and-pyqt4-for-macos">Configuring SIP and PyQt4 for MacOS</a></li>
</ul>
</li>
<li><a class="reference internal" href="#building-pyqt4">Building PyQt4</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="incompatibilities.html"
                        title="previous chapter">Potential Incompatibilities with Earlier Versions</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="python_v3.html"
                        title="next chapter">PyQt4 and Python v3</a></p>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="python_v3.html" title="PyQt4 and Python v3"
             >next</a> |</li>
        <li class="right" >
          <a href="incompatibilities.html" title="Potential Incompatibilities with Earlier Versions"
             >previous</a> |</li>
        <li><a href="index.html">PyQt 4.10.3 Reference Guide</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2013 Riverbank Computing Limited.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>