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 qmake.



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

The PyKDE tarball includes:

   - the necessary .sip files for the libraries being bound
     These cover all versions of PyKDE from KDE3.0.0 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 (now the default)
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. To run build.py with NO concatentation, it's now necessary
to specify '-c-' on the command line.

3. Running 'make' compiles the cpp files using gcc and
links .so libraries make builds. make temporarily installs the
.so files into the directory libs.

4. Running 'make install'  places the generated .py files in their
final destination, which is normally python/site-packages, but an
alternate directory can be specified with the -d switch. If the
destination directory is only root-writeable (as site-packages
should be), 'make install' must be run as root.



Test Matrix for PyKDE-3.7-4
---------------------------

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
-----------   ----------  ------------  ----------- --------------
KDE3.0.0 [1]
KDE3.0.1 [2]
KDE3.0.3        Qt3.0.5    SuSE 8.1      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
KDE3.1.1        Qt3.1.1    SuSE 8.1      gcc3.2      Python 2.2.1
KDE3.1.1        Qt3.1.1    RH 9.0        gcc3.2.2    Python 2.2.2
KDE3.1.2        Qt3.1.2    SuSE 8.2      gcc3.3      Python 2.2.2
KDE3.1.3        Qt3.1.1    SuSE 8.2      gcc3.3      Python 2.2.2
KDE3.1.3        Qt3.2.0    SuSE 8.2      gcc3.3      Python 2.3

[1] Supported but no longer tested

[2] Supported but no longer tested

[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: Athlon 1900, 1GB, X running

Machine        KDE Version    Distribution  build.py     make
                                             min:sec  hr:min:sec
-------        -----------    ------------  --------  ----------
   using qmake, -c switch
   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
   2              3.1.1        SuSE 8.2        8:03      18:01


   using qmake, no -c switch
   1              3.1.1        SuSE 8.1       16:50    2:10:06

