Construction Details
====================

"sip" is the program that is used generate Python bindings. The input to
sip is a modified version of the C++ .h files corresponding to the C++
code to be bound. sip is run on the input files (*.sip files) and
generates the necessary .py, .cpp, and .h files. With appropriate input
and switches, sip will also generate a Makefile template for the module
being bound, which can be used to generate a Makefile using tmake or
qmake.



The PyKDE package
-----------------

The PyKDE tarball includes:

   - the necessary .sip files for the libraries being bound
     These cover all versions of PyKDE from KDE2.1.1 to KDE3.1.1

   - scripting for generating templates used by tmake/qmake to
     generate Makefiles

   - Python scripts (build, postproc) that replace the
     configure script and generate the necessary cpp
     and h files for each module using the sip program and
     also generate custom Makefiles for each module and the
     entire program.



Building PyKDE
--------------

1. Running build.py ('python build.py') performs the normal system
checks and creates the cpp/h/Makefiles for the versions of Qt and
KDE on the user's machine.

2. If build.py is run with the '-c' switch ('python build.py -c')
it will concatenate together all of the cpp files for each module
into a single huge cpp file per module. Compiling the single huge
file is about 80% faster than compiling the individual files for
each module, and yields exactly the same lib result. Compiling
the single huge file is memory intensive however, and probably
requires at least 256MB of RAM, and/or sufficient swap file
space.

3. Running 'make' compiles the cpp files using gcc and
links .so libraries make builds. make also installs the .so files
into the appropriate directory. Currently, you need to run make
as the 'root' user.

4. Running 'make install' places the generate .py files in their
final destination. 'make install' no longer does a re-link.



Test Matrix for PyKDE-3.5-1
---------------------------

The following builds were tested successfully:

All builds with sip 3.5, PyQt-3.5 except KDE3.0.0 on SuSE 8.0 used
sip 3.6 pre-release snapshot

KDE Version   Qt Version  Distribution  gcc version Python version
-----------   ----------  ------------  ----------- --------------

KDE2.1.1        Qt2.3.0    SuSE 7.1      gcc2.95.2   Python 2,2,2
KDE2.1.2 [1]

KDE2.2.0        Qt2.3.1    SuSE 7.3      gcc2.95.3   Python 2.2.2
KDE2.2.1        Qt2.3.1    SuSE 7.3      gcc2.95.3   Python 2.1.1
KDE2.2.2        Qt2.3.1    SuSE 7.3      gcc2.95.3

KDE3.0.0        Qt3.0.3    SuSE 7.3      gcc2.95.3   Python 2.2.2
KDE3.0.0        Qt3.0.3    SuSE 8.0      gcc2.95.3   Python 2.2.0
KDE3.0.1        Qt2.3.1    SuSE 7.3      gcc2.95.3
KDE3.0.2 [2]
KDE3.0.3        Qt3.0.5    SuSE 8.1      gcc3.2      Python 2.2.1
KDE3.0.3        Qt3.0.5    Red Hat 8.0   gcc3.2      Python 2.2.1
KDE3.0.4 [3]
KDE3.0.5 [4]

KDE3.1.0        Qt3.1.1    SuSE 8.1      gcc3.2      Python 2.2.1
KDE3.1.1        Qt3.1.1    SuSE 8.1      gcc3.2      Python 2.2.1


[1] Minimal changes from KDE 2.1.1
[2] Minimal changes from KDE 3.0.1 - no KDE 3.0.2 specific version
    (use 3.0.1 version)
[3] Minimal changes from KDE 3.0.3 - no KDE 3.0.4 specific version
    (use 3.0.3 version)
[4] Minimal changes from KDE 3.0.3 - no KDE 3.0.5 specific version
    (use 3.0.3 version)

Build times:
-----------

Machine 1: 850MHz PIII, 256MB, X not running
Machine 2: 800MHz PIII, 272MB, X not running
Machine 3: 850MHz PIII, 512MB, X running
Machine 4: Athlon 1900, 1GB DDR, X running

Machine        KDE Version    Distribution  build.py     make
                                             min:sec  hr:min:sec
-------        -----------    ------------  --------  ----------
   using tmake, -c switch
   3              2.1.1        SuSE 7.1        2:56      12:40
   2              2.2.0        SuSE 7.3        3:27      14:47
   2              2.2.1        SuSE 7.3        3:42      14:36
   2              2.2.2        SuSE 7.3        3:23      15:19

   using qmake, -c switch
   2              3.0.0        SuSE 7.3       13:40      12:42
   4              3.0.0        SuSE 8.0        7:15       6:17
   2              3.0.1        SuSE 7.3       13:42      12:44
   1              3.0.3         RH 8.0         7:04      40:56
   1              3.0.3        SuSE 8.1       12:58      42:36
   1              3.1.0        SuSE 8.1       13:10      45:51
   1              3.1.1        SuSE 8.1       13:15      46:21

   using tmake, no -c switch
   3              2.1.1        SuSE 7.1        3:01    1:00:50

   using qmake, no -c switch
   4              3.0.0        SuSE 8.0        8:47      48:10
   2              3.0.1        SuSE 7.3       17:49    1:29:37
   1              3.1.1        SuSE 8.1       16:50    2:10:06

