Allows a component to state dependencies on other plugins
This plugin allows a Trac component to state a dependency on another
Component, via the
IRequireComponents interface from
class IRequireComponents(Interface): def requires(): """list of component classes that this component depends on"""
Component classes that are returned by the
requires method will be enabled upon environment upgrade. This allows very simple dependencies. Of course, for installation, the required components are still required to be part of Python (in
setup.py) and this plugin will not work if there is trouble loading a plugin that is required.
If you have any issues, create a new ticket.
Download the zipped source from here.
General instructions on installing Trac plugins can be found on the TracPlugins page.
The files in test.py illustrate how to use the plugin. Enable the
componentdependencies.componentdependency.componentdependencyplugin = enabled) and enable the
componentdependencies.test.testdependencyplugin = enabled). Trac will then require an upgrade. The
FooBarTest component will be enabled in the upgrade.
You can also enable the AutoUpgradePlugin prior to this to allow for automatic upgrades.
Originally developed at The Open Planning Project