[[PageOutline(2-5,Contents,pullout)]] = Allows a component to state dependencies on other plugins == Description This plugin allows a [trac:TracDev/ComponentArchitecture Component] to state a dependency on another `Component`, via the `IRequireComponents` interface from `componentdependencies.interface`: {{{#!python class IRequireComponents(Interface): def requires(): """list of component classes that this component depends on""" }}} The `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 `install_requires` in `setup.py`) and this plugin will not work if there is trouble loading a plugin that is required. == Bugs/Feature Requests Existing bugs and feature requests for ComponentDependencyPlugin are [report:9?COMPONENT=ComponentDependencyPlugin here]. If you have any issues, create a [/newticket?component=ComponentDependencyPlugin new ticket]. [[TicketQuery(component=ComponentDependencyPlugin&group=type,format=progress)]] == Download Download the zipped source from [download:componentdependencyplugin here]. == Source You can check out ComponentDependencyPlugin from [http://trac-hacks.org/svn/componentdependencyplugin/0.11 here] using Subversion, or [source:componentdependencyplugin browse the source] with Trac. == Installation General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page. == Example The files in [source:componentdependencyplugin/0.11/componentdependencies/test.py test.py] illustrate how to use the plugin. Enable the `ComponentDependencyPlugin` (`componentdependencies.componentdependency.componentdependencyplugin = enabled`) and enable the `TestDependencyPlugin` (`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. == Recent Changes [[ChangeLog(componentdependencyplugin, 3)]] == Author/Contributors ''Originally developed at [http://openplans.org The Open Planning Project]'' '''Author:''' [wiki:k0s] [[BR]] '''Maintainer:''' [[Maintainer]] [[BR]] '''Contributors:'''