Installation & Distutils support
Prev
Next

Chapter 2. Installation & Distutils support

C++ projects on TDE traditionally use autoconf, automake and libtool to handle the building and installation. These tools and difficult to use, even for experianced developers.

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. PyTDE Extensions builds on Distutils with extensions tailored for handling TDE programs.

A typical TDE 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. PyTDE Extensions provides support for handling all these other files types.

Using Distutils with TDE programs

It is advised that you first read the standard Distutils documentation to learn about how it works. PyTDE Extensions adds some TDE specific extensions which are documented below.

Distutils is based around writing a setup.py file which then uses the distutils package To use the TDE extensions, the first thing you need to do in your setup.py file is include the tdedistutils package.

#!/usr/bin/env python
# Setup.py file for MyTDEApplication

import tdedistutils
You need to call the setup() function from tdedistutils with all of the configuration information about your application, much like the standard setup() from distutils.
tdedistutils.setup(name="pytdeextensions",
    version="0.1.0",
    author="Simon Edwards",
    author_email="simon@simonzone.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 TDE needed to install and run the software. These requirements are checked during install.

The other arguments shown here are standard distutils.setup() arguments.

Prev
Next
Home


Would you like to comment or contribute an update to this page?
Send feedback to the TDE Development Team