1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459
|
<!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 PyQt — PyQt 4.9.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.9.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.9.3 Reference Guide" href="index.html" />
<link rel="next" title="PyQt 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="PyQt 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.9.3 Reference Guide</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="installing-pyqt">
<h1>Installing PyQt<a class="headerlink" href="#installing-pyqt" 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 PyQt. 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://www.riverbankcomputing.com/static/Docs/sip4/index.html">http://www.riverbankcomputing.com/static/Docs/sip4/index.html</a>.</p>
</div>
<div class="section" id="downloading-pyqt">
<h2>Downloading PyQt<a class="headerlink" href="#downloading-pyqt" title="Permalink to this headline">¶</a></h2>
<p>You can get the latest release of the GPL version of the PyQt 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 PyQt 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-pyqt">
<h2>Configuring PyQt<a class="headerlink" href="#configuring-pyqt" 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 PyQt 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. For example, if you are using a binary distribution
of Qt on Windows then make sure you have run the <tt class="file docutils literal"><span class="pre">qtvars.bat</span></tt> file. For
other platforms it is normally enough to ensure that Qt’s <tt class="file docutils literal"><span class="pre">bin</span></tt> directory
is on your <span class="target" id="index-0"></span><tt class="xref std std-envvar docutils literal"><span class="pre">PATH</span></tt>.</p>
<p>Next you need to configure SIP by executing the <strong class="program">configure.py</strong> script.
For example:</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:\python32\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 PyQt for.</p>
<p>The full set of command line options is:</p>
<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 PyQt version number.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-configure.py-h">
<tt class="descname">-h</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--help</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py-h" title="Permalink to this definition">¶</a></dt>
<dd><p>Display a help message.</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 PyQt license.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-configure.py-k">
<tt class="descname">-k</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--static</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py-k" title="Permalink to this definition">¶</a></dt>
<dd><p>The PyQt modules will be built as static libraries. This is useful when
building a custom interpreter with the PyQt modules built in to the
interpreter.</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 PyQt modules will not contain automatically generated docstrings.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-configure.py-r">
<tt class="descname">-r</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--trace</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py-r" title="Permalink to this definition">¶</a></dt>
<dd><p>The generated PyQt modules contain additional tracing code that is enabled
using SIP’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-u">
<tt class="descname">-u</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--debug</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py-u" title="Permalink to this definition">¶</a></dt>
<dd><p>The PyQt 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-w">
<tt class="descname">-w</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--verbose</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py-w" 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-c">
<tt class="descname">-c</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--concatenate</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py-c" 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-j"><em class="xref std std-option">--concatenate-split</em></a> option.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-configure.py-j">
<tt class="descname">-j</tt><tt class="descclassname"> <N></tt><tt class="descclassname">, </tt><tt class="descname">--concatenate-split</tt><tt class="descclassname"> <N></tt><a class="headerlink" href="#cmdoption-configure.py-j" title="Permalink to this definition">¶</a></dt>
<dd><p>If the <a class="reference internal" href="#cmdoption-configure.py-c"><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--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-g">
<tt class="descname">-g</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--consolidate</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py-g" title="Permalink to this definition">¶</a></dt>
<dd><p>Normally each PyQt 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 PyQt modules.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-configure.py-e">
<tt class="descname">-e</tt><tt class="descclassname"> <MODULE></tt><tt class="descclassname">, </tt><tt class="descname">--enable</tt><tt class="descclassname"> <MODULE></tt><a class="headerlink" href="#cmdoption-configure.py-e" 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-t">
<tt class="descname">-t</tt><tt class="descclassname"> <PLUGIN></tt><tt class="descclassname">, </tt><tt class="descname">--plugin</tt><tt class="descclassname"> <PLUGIN></tt><a class="headerlink" href="#cmdoption-configure.py-t" 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"><PLUGIN></span></tt> will be linked with the appropriate PyQt module. The option
may be specified any number of times.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-configure.py-T">
<tt class="descname">-T</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--no-timestamp</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py-T" 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-q">
<tt class="descname">-q</tt><tt class="descclassname"> <FILE></tt><tt class="descclassname">, </tt><tt class="descname">--qmake</tt><tt class="descclassname"> <FILE></tt><a class="headerlink" href="#cmdoption-configure.py-q" title="Permalink to this definition">¶</a></dt>
<dd><p>Qt’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.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-configure.py-s">
<tt class="descname">-s</tt><tt class="descclassname"> <DIR></tt><tt class="descclassname">, </tt><tt class="descname">--dbus</tt><tt class="descclassname"> <DIR></tt><a class="headerlink" href="#cmdoption-configure.py-s" 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"><DIR>/dbus</span></tt>.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-configure.py-b">
<tt class="descname">-b</tt><tt class="descclassname"> <DIR></tt><tt class="descclassname">, </tt><tt class="descname">--bindir</tt><tt class="descclassname"> <DIR></tt><a class="headerlink" href="#cmdoption-configure.py-b" 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"><DIR></span></tt>.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-configure.py-d">
<tt class="descname">-d</tt><tt class="descclassname"> <DIR></tt><tt class="descclassname">, </tt><tt class="descname">--destdir</tt><tt class="descclassname"> <DIR></tt><a class="headerlink" href="#cmdoption-configure.py-d" title="Permalink to this definition">¶</a></dt>
<dd><p>The PyQt Python package will be installed in the directory <tt class="docutils literal"><span class="pre"><DIR></span></tt>. The
default is the Python installation’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-2"></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"><DIR></span></tt>.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-configure.py-p">
<tt class="descname">-p</tt><tt class="descclassname"> <DIR></tt><tt class="descclassname">, </tt><tt class="descname">--plugin-destdir</tt><tt class="descclassname"> <DIR></tt><a class="headerlink" href="#cmdoption-configure.py-p" 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"><DIR></span></tt>.</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-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 PyQt modules will not be installed.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-configure.py-v">
<tt class="descname">-v</tt><tt class="descclassname"> <DIR></tt><tt class="descclassname">, </tt><tt class="descname">--sipdir</tt><tt class="descclassname"> <DIR></tt><a class="headerlink" href="#cmdoption-configure.py-v" title="Permalink to this definition">¶</a></dt>
<dd><p>The <tt class="docutils literal"><span class="pre">.sip</span></tt> files for the PyQt modules will be installed in the directory
<tt class="docutils literal"><span class="pre"><DIR></span></tt>.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-configure.py--use-arch">
<tt class="descname">--use-arch</tt><tt class="descclassname"> <ARCH></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"><ARCH></span></tt>. See the section <a class="reference internal" href="#ref-macos"><em>Configuring SIP and PyQt for MacOS</em></a>.</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 PyQt 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-i">
<tt class="descname">-i</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--vendorid</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py-i" 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-l"><em class="xref std std-option">--vendorid-incdir</em></a> and
<a class="reference internal" href="#cmdoption-configure.py-m"><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 PyQt Applications</em></a>.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-configure.py-l">
<tt class="descname">-l</tt><tt class="descclassname"> <DIR></tt><tt class="descclassname">, </tt><tt class="descname">--vendorid-incdir</tt><tt class="descclassname"> <DIR></tt><a class="headerlink" href="#cmdoption-configure.py-l" 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"><DIR></span></tt>.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-configure.py-m">
<tt class="descname">-m</tt><tt class="descclassname"> <DIR></tt><tt class="descclassname">, </tt><tt class="descname">--vendorid-libdir</tt><tt class="descclassname"> <DIR></tt><a class="headerlink" href="#cmdoption-configure.py-m" 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"><DIR></span></tt>.</p>
</dd></dl>
<dl class="cmdoption">
<dt id="cmdoption-configure.py-a">
<tt class="descname">-a</tt><tt class="descclassname"></tt><tt class="descclassname">, </tt><tt class="descname">--qsci-api</tt><tt class="descclassname"></tt><a class="headerlink" href="#cmdoption-configure.py-a" 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-n"><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--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-n">
<tt class="descname">-n</tt><tt class="descclassname"> <DIR></tt><tt class="descclassname">, </tt><tt class="descname">--qsci-api-destdir</tt><tt class="descclassname"> <DIR></tt><a class="headerlink" href="#cmdoption-configure.py-n" 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"><DIR></span></tt>.</p>
</dd></dl>
</div>
<div class="section" id="configuring-sip-and-pyqt-for-macos">
<span id="ref-macos"></span><h2>Configuring SIP and PyQt for MacOS<a class="headerlink" href="#configuring-sip-and-pyqt-for-macos" title="Permalink to this headline">¶</a></h2>
<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’s and PyQt’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"><ARCH></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"><VERSION></span></tt> specifies the earliest version of MacOS you
want to support. This sets the <span class="target" id="index-3"></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"><SDK></span></tt> specifies the SDK to use.</li>
</ul>
<p>PyQt 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 PyQt 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 class="section" id="building-pyqt">
<h2>Building PyQt<a class="headerlink" href="#building-pyqt" title="Permalink to this headline">¶</a></h2>
<p>The next step is to build PyQt by running your platform’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 PyQt 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 PyQt 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 PyQt</a><ul>
<li><a class="reference internal" href="#downloading-sip">Downloading SIP</a></li>
<li><a class="reference internal" href="#downloading-pyqt">Downloading PyQt</a></li>
<li><a class="reference internal" href="#configuring-pyqt">Configuring PyQt</a></li>
<li><a class="reference internal" href="#configuring-sip-and-pyqt-for-macos">Configuring SIP and PyQt for MacOS</a></li>
<li><a class="reference internal" href="#building-pyqt">Building PyQt</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">PyQt 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="PyQt 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.9.3 Reference Guide</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2011 Riverbank Computing Limited.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div>
</body>
</html>
|