wiki:ComponentDependencyPlugin

Version 7 (modified by figaro, 9 years ago) (diff)

Added generic installation instructions

Allows a component to state dependencies on other plugins

Notice: This plugin is unmaintained and available for adoption.

Description

This plugin allows a Component to state a dependency on another Component, via the IRequireComponents interface from componentdependencies.interface:

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 here.

If you have any issues, create a new ticket.

defect

0 / 1

task

1 / 2

Download

Download the zipped source from [download:componentdependencyplugin here].

Source

You can check out ComponentDependencyPlugin from here using Subversion, or browse the source with Trac.

Installation

General instructions on installing Trac plugins can be found on the TracPlugins page.

Example

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.

You can also enable the AutoUpgradePlugin prior to this to allow for automatic upgrades.

Recent Changes

17722 by rjollos on 2020-05-06 00:24:56
TracComponentDependency 0.3: Add classifiers

Version 0.3 has been released to PyPI.

Fixes #13691.

17595 by rjollos on 2019-11-25 23:35:08
TracComponentDependency 0.2: Prepare to publish on PyPI

Refs #13691.

17562 by rjollos on 2019-11-17 20:06:51
Make compatible with Trac 1.4
(more)

Author/Contributors

Originally developed at The Open Planning Project

Author: k0s
Maintainer: none
Contributors: