Version 5 (modified by athomas, 10 years ago) (diff)


Example plugin from


A component that handles HTTP requests and extends the navigation bar.

More information at

Bugs/Feature Requests

N/A, example.


Copy and paste this.


Authoritative instructions here, but reproduced below:

trac:TracPlugins are packaged as Python Eggs. You can use setuptools to make a script that will produce a Python Egg for your plugin.

The egg file needs to have a file named trac_plugin.txt in its EGG-INFO directory. This file should contain the names of all modules that need to be imported by Trac to register your components.

Note that this will change in the very near future: setuptools 0.6 will introduce the concept of “entry points”, which will be used instead of the trac_plugin.txt descriptor.. See TracPlugins for details.

A plugin can either be deployed globally, or only for a specific environment. Global deployment is done by installing the plugin:

$ cd /path/to/pluginsource
$ python install

To deploy a plugin only to a specific Trac environment, copy the egg file into the plugins directory of that environment:

$ cd /path/to/pluginsource
$ python bdist_egg
$ cp dist/*.egg /path/to/projenv/plugins

During development of a plugin, it is inconvenient to have to install it in either of the ways described above. Instead, you should use the setuptools develop command:

$ cd /path/to/pluginsource
$ python develop --install-dir=/path/to/projenv/plugins

You can omit the --install-dir argument to make the development version of your plugin available globally.

This will install an .egg-link file instead of the actual egg. That file is basically a link to the source directory of your plugin, so that Trac will always see the latest version of your code.

A tutorial to build your own plugins is available here: EggCookingTutorial


Author: trac:TracTeam