Python Bindings for KDE (PyKDE-3.16.0)
Prev |  | Next

# configure.py Options

PyKDE builds and installs in a lot of different environments and it isn't always possible to foresee where users or distributions will locate components that PyKDE depends on. There are a number of command line switches used to force configure.py to look in the correct locations for directories or files.

    python configure.py -h

    Usage:
        python configure.py [-h] [-c] [-d dir] [-g] [-j #] [-k] [-n dir] [-o dir] [-r] [-u] [-v dir] [-z file]
    where:
        -h      displays this help message
        -c      concatenates each module's C/C++ source files [default]
        -d dir  where the PyKDE modules will be installed [default /usr/lib/python2.3/site-packages]
        -g      always release the GIL (SIP v3.x behaviour)
        -i      no concatenation of each module's C/C++ source files
        -j #    splits the concatenated C++ source files into # pieces [default 1]
        -k dir  the KDE base directory
        -n dir  the directory containing the KDE lib files
        -o dir  the directory containing the KDE header files
        -r      generates code with tracing enabled [default disabled]
        -u      build with debugging symbols
        -v dir  where the PyKDE .sip files will be installed [default /usr/share/sip]
        -w      turn on KDE deprecated object warnings when compiling [default off]
        -z file the name of a file containing command line flags

    If reporting errors, paste all of the output above into your
    message and post to the PyKDE mailing list at:

         mailto:    PyKDE@mats.imk.fraunhofer.de
         subscribe: http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

    You can redirect the output into a file (> output.txt) if needed

NOTE: In the descriptions below "Default" is a "typical" value for common distributions and may not be the complete path needed. You should always specify the complete path. configure.py searches a number of locations in looking for the appropriate directories, which may depend on the distribution used, where the version of Python used to run configure.py is located, and other factors. For example, a default value of "python/site-packages" could be "/usr/lib/python/site-packages", "/usr/local/python2.3/site-packages" or other values depending on how and where Python is installed or which of several installed versions of Python is used to run configure.py. configure.py will not try to complete the path for switch specified paths - you must specifiy the complete path (eg /usr/lib/python/site-packages or ../kdecore)

For "normal" installations, configure.py will automatically discover all of the information covered by the options below -- it is only necessary to use the options switches when configure.py can't discover a location by itself.

-c Concatenation
  Building PyKDE involves loading a large number of cpp and h files. The compile process can be speeded up considerably (by as much as 80%) by concatenating all of the cpp files into a one (or several - see -j) large cpp file. The price for this speed up is a large increase in memory usage. By default, the feature is 'on' in configure.py. To turn this feature off, use '-i'. You may wish to turn this off if the system doing the compile has 128MB or less RAM.

-d Installation directory

  Value: directory path |  | configure.py Default: python/site-packages/ |

  Normally, the PyKDE modules are installed in python/site-packages. Writing to this directory requires root access. RPM builders sometimes need to build the modules to a different directory, or you may want to install the modules in a different location (for example, in a subdirectory of site-packages/). For this option to be useful, you need to ensure that Python can still locate and import the PyKDE modules from the specified destination.

-g Always release GIL (sip 3.0 behaviour)
  This is a code generation option that only affects sip 4.0. It causes sip to generate C++ whose threading behavior is more like sip 3.0.

-i NO Concatenation
  This option causes configure.py to generate C++ code and makefiles that compile many small file one at a time (rather than one huge file for each module). This increase compile time by about 80%, but reduces memory consumption. See -c above.

-j # of splits of concatenated files

  Value: number of splits |  | configure.py Default: 1 |

  Intended for use on multi-CPU systems. Splits the concatenated cpp file into the specified number of segments, each of which can be compiled concurrently in separate threads. On single processor systems, each "split" will compile in sequence. The kdeui module is (with concatenation active) is split into two pieces by default to reduce memory consumption. Values for 'j' greater than 2 will be honored correctly.

-k KDE base directory

  Value: directory path |  | configure.py Default: kde3/ |

  The top level directory under which kde3/libs and kde3/include are located (these paths can also be specified independently see -n and -o) On SuSE distributions, this is typically /opt/kde3. On Red Hat and Mandrake, this is typically /usr. configure.py will find the typical locations automatically. configure .py will use the KDEDIR environment variable value if it is defined and the -k switch is NOT used.

-n KDE library files

  Value: directory path |  | configure.py Default: kde3/libs |

  The path to KDE's library files (libkdecore.so, etc).

-o KDE h files

  Value: directory path |  | configure.py Default: kde3/include |

  The path to KDE's h files. (May require installation of kdelibs3-devel rpm package) configure.py. PyKDE will locate h files in subdirectories of this path automatically (eg kde3/include/kio/*.h)

-r generate code with tracing enabled
  For debugging

-u debugging symbols
  For debugging

-v PyKDE sip files

  Value: directory path |  | configure.py Default: /usr/share/sip/ |

  The path where the PyKDE sip files will be copied (for use by programs that use sip binding dependent on PyKDE)

-w KDE deprecation warnings
  KDE marks a number of methods as 'deprecated'. The methods marked will generate warnings at compile time. By default, PyKDE's configure.py turns these warnings off. -w will turn them on.

-z Path to configure.py options file

  Value: filename or path |  | configure.py Default: none |

  If your site requires the use of more than one or two option switches, you can place all of the options in a text file and then reference only the text file's path and name on the command line. The options are placed in the text file just as they would be on the command line, with one option per line. For example, the options file for the command "python configure.py -c- -v /usr/local/PyQt/sip" would look like:

  #### options.txt

      -c
      -v /usr/local/PyQt/sip

  and would be run as "python configure.py -z options.txt" (assuming options.txt is in the current directory).

-l (lower case L) code gen control -- not displayed with -h
  If for some reason you need to rebuild a PyKDE module but not all of PyKDE, you can use -l. -l <modulename> (eg -l kdecore) will rebuild only the module specified; -l <modulename>: (eg -l kdecore:) will rebuild the module specified and all successive modules. If changes are made that affect linking (especially deleting methods or other symbols), you must use the ":" form, since later modules depend on earlier modules.

Prev | Home | Next
Troubleshooting |  | Class Reference Documentation