Python Distutils Extra
1. Introduction
Python-distutils-extra allows to easily integrate themable icons, scrollkeeper based documentation and gettext based translations in your python install and build tools. It can be used with python's distutils or the enhanced setuptools.
2. Usage
Distutils
To make use of the distutils extenstions, you have to import the corresponding methods at the beginning of your setup.py:
from DistUtilsExtra.command import *
Furthermore you have to map the methods to the extended ones:cmdclass = { "build" : build_extra.build_extra,
"build_i18n" : build_i18n.build_i18n }
If you have replaced the default build command by build_extra and defined the other commands e.g. build_i18n, the sub commands e.g. will be called automatically. There is no need to enable them in the setup.cfg anymore (This was require in a previous version). Disabling imported commands in the setup.cfg is still possible:[build]
i18n=False
See the setup.cfg.example for a more complex layout.
Currently there are the following extensions available:
Command | Description |
build_extra | initiates the extensions |
build_i18n | provides gettext integration |
build_icons | installs icons |
build_help | installs a docbook based documentation |
Setuptools
Just enable the corresponding build target in the setup.cfg:
[build]
i18n=True
help=True
icons=True
No further imports or modifications are required.
Example Files
3. Source Code
The source code is maintained in a bzr repository. To get the latest code please run the following command:
bzr branch www.glatzor.de/bzr/python-distutils-extra/sebi