15 | | 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. |
| 15 | 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, as given in `install_requires` in `setup.py`. |
| 16 | |
| 17 | This plugin will not work if required plugins are not present or loaded. |
| 18 | |
| 19 | The files in [source:componentdependencyplugin/0.11/componentdependencies/test.py test.py] illustrate how to use the plugin. In your `trac.ini` file, enable the following plugins: |
| 20 | * `ComponentDependencyPlugin`: |
| 21 | {{{#!ini |
| 22 | componentdependencies.componentdependency.componentdependencyplugin = enabled |
| 23 | }}} |
| 24 | * `TestDependencyPlugin`: |
| 25 | {{{#!ini |
| 26 | componentdependencies.test.testdependencyplugin = enabled |
| 27 | }}} |
| 28 | |
| 29 | Trac will then require an upgrade. The `FooBarTest` component will be enabled in the upgrade. |