| 1 | = allows components to state dependencies on other plugins = |
| 2 | |
| 3 | == Description == |
| 4 | |
| 5 | ComponentDependencyPlugin allows a `Component` to state a dependency on other plugin, via the `IRequireComponents` interface: |
| 6 | |
| 7 | {{{ |
| 8 | class IRequireComponents(Interface): |
| 9 | def requires(): |
| 10 | """list of component classes that this component depends on""" |
| 11 | }}} |
| 12 | |
| 13 | 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. |
| 14 | |
| 15 | == Bugs/Feature Requests == |
| 16 | |
| 17 | Existing bugs and feature requests for ComponentDependencyPlugin are |
| 18 | [report:9?COMPONENT=ComponentDependencyPlugin here]. |
| 19 | |
| 20 | If you have any issues, create a |
| 21 | [http://trac-hacks.org/newticket?component=ComponentDependencyPlugin&owner=k0s new ticket]. |
| 22 | |
| 23 | == Download == |
| 24 | |
| 25 | Download the zipped source from [download:componentdependencyplugin here]. |
| 26 | |
| 27 | == Source == |
| 28 | |
| 29 | You can check out ComponentDependencyPlugin from [http://trac-hacks.org/svn/componentdependencyplugin here] using Subversion, or [source:componentdependencyplugin browse the source] with Trac. |
| 30 | |
| 31 | == Example == |
| 32 | |
| 33 | The files in `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. |
| 34 | |
| 35 | |
| 36 | |
| 37 | == Recent Changes == |
| 38 | |
| 39 | [[ChangeLog(componentdependencyplugin, 3)]] |
| 40 | |
| 41 | == Author/Contributors == |
| 42 | |
| 43 | '''Author:''' [wiki:k0s] [[BR]] |
| 44 | '''Contributors:''' |