Fortunately Python has a its own system for building and installing modules and software. Distutils is a standard Python package and comes with every Python installation. PyKDE Extensions builds on Distutils with extensions tailored for handling KDE programs.
A typical KDE program comes not only with the program itself but also extra files such as a manual written in Docbook format, translation files, icons, images and other auxiliary data files. PyKDE Extensions provides support for handling all these other files types.
It is advised that you first read the standard Distutils documentation to learn about how it works. PyKDE Extensions adds some KDE specific extensions which are documented below.
Distutils is based around writing a
setup.py file which
then uses the distutils package
To use the KDE extensions, the first thing you need to do in your
file is include the kdedistutils package.
#!/usr/bin/env python # Setup.py file for MyKDEApplication import kdedistutilsYou need to call the setup() function from kdedistutils with all of the configuration information about your application, much like the standard setup() from distutils.
kdedistutils.setup(name="pykdeextensions", version="0.1.0", author="Simon Edwards", author_email="email@example.com", url="http://www.simonzone.com/software/pykdeextensions/", min_kde_version = "3.0.0", min_qt_version = "3.0.0", license = "LGPL" )min_kde_version and min_qt_version specify the minimum versions of the Qt library and KDE needed to install and run the software. These requirements are checked during install.
The other arguments shown here are standard distutils.setup() arguments.