General Installation Notes For PyKDE Components

Note: This document is marked up using reStructuredText. It should be readable in a text editor but can be processed to produce versions of this document in other formats.

Contents

Introduction

PyKDE components that perform roles in KDE's infrastructure typically require an accompanying shared library object to be built and installed alongside them.

These libraries are built and installed using a common build script which will configure the build process for your system. This relies on DistUtils for information about the Python interpreter and its environment, and looks for KDE installation details such as the KDEDIR environment variable.

Each component and library may be installed by either ordinary users or the root user but, in each case, it is necessary to both build and install each component as the same user.

Installation as an ordinary user

When an ordinary user builds and installs a component, the library is typically installed in the .kde/lib/kde3 directory inside the user's home directory. Python modules are stored in a directory created within the .kde/share/apps directory.

Components are usually accompanied by desktop files which are installed somewhere within the .kde/share directory structure, depending on the purpose of the component. Additionally, other resources are placed in locations consistent with this scheme.

Installation as root user

For the root user, the installed location of the library, Python program and other resources are within the directory specified by the KDEDIR environment variable. On some systems, KDE is installed in the /opt/kde directory, but this varies between Linux distributions, for example. In the following text, $KDEDIR refers to the location of the KDE installation.

Typically, libraries are installed in the $KDEDIR/lib/kde3 directory, Python modules are placed in subdirectories of $KDEDIR/share/apps and desktop files are installed within the $KDEDIR/share directory structure. As with the installation process for ordinary users, other resources are placed in a manner consistent with this scheme.

Installation and uninstallation at the command line

To build and install a component, you may first wish to login as a particular user (e.g. su - root) and, if the component is provided with a setup.py script, enter the directory containing the component's files.

If a component is not supplied with a setup.py script then either one can be copied into its directory or the component can be built using a modified form of the following sequence of instructions.

The library used to launch the component and any dynamically created resources are built by typing:

python setup.py build

resulting in the creation of a library and other resources. If this is successful, the component can be installed in the appropriate place by the following invocation:

python setup.py install

If you wish to uninstall the component then it is necessary to log in using the same username as before. You may then perform the following actions to clean the build directory and uninstall the component:

python setup.py clean
python setup.py uninstall

If the component was not supplied with its own setup.py script then the one supplied with this package can be used. However, it is necessary to specify both the location of the component and its resources. For example, from the main directory of this package, we may build and install the thumbcreators/shell component by using the following commands:

python setup.py build thumbcreators/shell
python setup.py install thumbcreators/shell