summaryrefslogtreecommitdiffstats
path: root/python/pykde/doc/install.html
blob: d75bbbe7da56ceb21d6f25fd1b65ee24d6ab5e1d (plain)
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN
		"http://www.w3.org/TR/html4/loose.dtd"">
<html>
<head>
  <title>Installation</title>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <meta name="GENERATOR" content="Quanta Plus">
</head>
<body>
<DIV
CLASS="NAVHEADER"
><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0">
<TR><TH COLSPAN="3" ALIGN="center">Python Bindings for KDE (PyKDE-3.16.0)</TH></TR>
<TR><TD WIDTH="10%" ALIGN="left" VALIGN="bottom"><A HREF="index1.html" ACCESSKEY="P">Prev</A></TD>
<TD WIDTH="80%" ALIGN="center" VALIGN="bottom"></TD>
<TD WIDTH="10%" ALIGN="right" VALIGN="bottom"><A HREF="trouble.html" ACCESSKEY="N">Next</A></TD>
</TR>
</TABLE><HR ALIGN="LEFT" WIDTH="100%"></DIV>
<h1>Installation</h1>
These docs only cover installing PyKDE from source (ie building and compiling PyKDE). You
should read the "Testing" section at the end of this page even if installing from RPMs. RPM
installs also have the same System Requirements as noted in the next section.
<p>
Before reporting bugs, please read the <a href="trouble.html">Troubleshooting</a> and
<a href="switches.html">build.py Options</a> pages.
</p>
<h2>System Requirements</h2>
<p>PyKDE only runs on Linux or other Unix-based systems. The usual tools (compiler,
linker, make, etc) are required. In addition you need:
</p>
<dl>
<dt>sip</dt>
<dd>
sip must be installed. sip is the bindings code generator and run-time lib for PyKDE. You can get it
<a href="http://www.riverbankcomputing.co.uk/sip/download.php">here</a>
</dd>
<dt>PyQt</dt>
<dd>
PyQt must be installed Just as KDE depends on Qt, PyKDE depends on PyQt. If you don't already have
PyQt installed, you can get it <a href="http://www.riverbankcomputing.co.uk/pyqt/download.php">here</a></dd>
</dl>
<p>
<b>NOTE: sip, PyQt, and PyKDE must be compatible versions (the PyKDE build script will test
for this). That means if you are installing PyKDE-3.16.0, you must have installed:</b>
</p>
<ul>
<li><b>sip-x11-gpl-4.2.0  or later (earlier sip 4 versions may work, but are untested)</b></li>
<li><b>PyQt-x11-gpl-@PyQt Version@ or later</b></li>
</ul>
<p>
Of course you must also have Python (version 2.2 or later), KDE (any KDE 3.0 - 3.5.3 version)
and Qt (any version from 3.0 through 3.3.x) installed. PyKDE no longer supports KDE1 or KDE2.
These files only work with KDE and Qt 3.x.x - they don't work with Qt4 or the upcoming KDE 4.
</p>
<h4>If PyQt was installed from an RPM ---</h4>
<p>
If you have installed sip and PyQt from binaries, to build PyKDE you <b>must</b> have
the sipconfig.py and pyqtconfig.py files (suitable for your environment) installed. These
are in the same location as the PyQt files (usually python/site-packages). These config
files are generated automatically if you build/compile sip and PyQt from source.
</p>
<p>
PyKDE also requires the PyQt sip files to build and compile. If you installed PyQt from an 
RPM, you also need to have installed the corresponding "PyQt-devel" RPM, which contains the 
PyQt sip files.
</p>
<h2>Installing from source code</h2>
<p>
Unpack the PyKDE tarball to a directory you have write access to. /usr/local is a good choice
if you have write access or can obtain it. Some place in your home directory is also a good
choice. I'll assume /usr/local for these instructions.
</p>
<p>
Change to the PyKDE directory (eg "cd /usr/local/PyKDE-3.16.0" or whatever the complete
version of the downloaded PyKDE package was).
</p>
<p>
At a command line prompt (as a user, not as root), enter:
</p>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
<pre CLASS="PROGRAMLISTING">
    python configure.py
</pre>
</td>
</tr>
</table>
<p>
<i>configure.py</i> will check your system to locate Python and releated files, Qt, KDE, sip and PyQt. It
will also run several tests, and then begin generating the C++ code and make files for PyKDE. The entire
process should take about 2 to 10 minutes depending on your computer's speed and available memory.
<i>configure.py</i> will report its progress throughout its run. If errors occur, see the sections on
troubleshooting below.
</p>
<p>
After <i>configure.py</i> has run to completion successfully, you next need to compile PyKDE. Simply
type:
</p>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
<pre CLASS="PROGRAMLISTING">
    make
</pre>
</td>
</tr>
</table>
<p>
PyKDE takes anywhere from 15 minutes to over an hour to compile, depending on the speed of your
computer, available memory, and other tasks running. Once PyKDE has compiled, do:
</p>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
<pre CLASS="PROGRAMLISTING">
    su -c"make install"
</pre>
</td>
</tr>
</table>
<p>
Your system will ask for your root password, and if entered correctly will proceed to install
PyKDE. 
</p>
<h2>File concatention</h2>
<p>
If your computer has 256MB or more of memory, you will probably benefit from "file concatenation".
When generating C++ files, sip can generate either a single file for each class in a module, or a
single huge file that contains all classes in the module. The latter is the "concatenated" version.
</p>
<p>
As long as swapping doesn't occur and memory isn't exhausted, the concatenated files will compile
up to 80% faster than individual files. However, some hardware and some gcc versions are not
compatible with the large concatenated files. You can control whether sip concatenates files
by passing either the -i switch (concatenation off) or -c switch (concatenation on) to configure.py.
</p>
<p>
configure.py is currently programmed to detect the gcc version being used, and will turn on
concatenation for gcc earlier than 4.0 and turn off concatentation for gcc 4.0 or later. You
can override this automatic choice with -i or -c as needed.
</p>
<h2>Testing the installation</h2>
<p>
There are a number of things you can do to test your installation. The simplest test that also
covers the most common errors is (still in the top level PyKDE directory):
</p>
<table border="0" bgcolor="#E0E0E0" width="100%">
<tr>
<td>
<pre CLASS="PROGRAMLISTING">
    python importTest.py
</pre>
</td>
</tr>
</table>
<p>
If you get errors running this test, see the troubleshooting section below.
</p>
<p>
There are also sample programs you can run (which also test some of PyKDE's features) in the
examples/ and templates/ subdirectories.
</p>

<DIV CLASS="NAVFOOTER">
<HR ALIGN="LEFT" WIDTH="100%">
<TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" >
<TR>
<TD WIDTH="33%" ALIGN="left" VALIGN="top"><A HREF="index1.html" ACCESSKEY="P">Prev</A></TD>
<TD WIDTH="34%" ALIGN="center" VALIGN="top"><A HREF="index.html" ACCESSKEY="H">Home</A></TD>
<TD WIDTH="33%" ALIGN="right" VALIGN="top"><A HREF="trouble.html" ACCESSKEY="N">Next</A></TD>
</TR>
<TR>
<TD WIDTH="33%" ALIGN="left" VALIGN="top">Introduction</TD>
<TD WIDTH="34%" ALIGN="center" VALIGN="top">&nbsp;</TD>
<TD WIDTH="33%" ALIGN="right" VALIGN="top">Troubleshooting</TD>
</TR>
</TABLE>
</DIV>
</body>
</html>