diff --git a/master/buildbot/interfaces.py b/master/buildbot/interfaces.py index c05563addc9..a138f22e0f8 100644 --- a/master/buildbot/interfaces.py +++ b/master/buildbot/interfaces.py @@ -50,7 +50,7 @@ class IPlugin(Interface): """ -class IChangeSource(Interface): +class IChangeSource(IPlugin): """ Service which feeds Change objects to the changemaster. When files or diff --git a/master/buildbot/plugins/__init__.py b/master/buildbot/plugins/__init__.py index e69de29bb2d..e5d5ee2ab44 100644 --- a/master/buildbot/plugins/__init__.py +++ b/master/buildbot/plugins/__init__.py @@ -0,0 +1,23 @@ +# This file is part of Buildbot. Buildbot is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation, version 2. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., 51 +# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Copyright Buildbot Team Members + +""" +Buildbot plugin infrastructure +""" + +from buildbot.plugins.db import get_plugins +from buildbot.interfaces import IChangeSource + +changes = get_plugins('change_source', IChangeSource) diff --git a/master/setup.py b/master/setup.py index 90f88274ab4..7e4a7f4a9a4 100755 --- a/master/setup.py +++ b/master/setup.py @@ -85,6 +85,33 @@ def make_release_tree(self, base_dir, files): open(dst_fn, 'w').write(src) +def define_plugin_entry(name, module_name): + """ + helper to produce lines suitable for setup.py's entry_points + """ + if isinstance(name, tuple): + entry, name = name + else: + entry = name + return '%s = %s:%s' % (entry, module_name, name) + + +def define_plugin_entries(groups): + """ + helper to all groups for plugins + """ + result = dict() + + for group, modules in groups: + tempo = [] + for module_name, names in modules: + tempo.extend([define_plugin_entry(name, module_name) + for name in names]) + result[group] = tempo + + return result + + long_description = """ The Buildbot is a system to automate the compile/test cycle required by most software projects to validate code changes. By automatically @@ -175,6 +202,22 @@ def make_release_tree(self, base_dir, files): 'scripts': scripts, 'cmdclass': {'install_data': install_data_twisted, 'sdist': our_sdist}, + 'entry_points': define_plugin_entries([ + ('buildbot.change_source', [ + ('buildbot.changes.mail', [ + 'MaildirSource', 'CVSMaildirSource', + 'SVNCommitEmailMaildirSource', + 'BzrLaunchpadEmailMaildirSource']), + ('buildbot.changes.bitbucket', ['BitbucketPullrequestPoller']), + ('buildbot.changes.bonsaipoller', ['BonsaiPoller']), + ('buildbot.changes.gerritchangesource', ['GerritChangeSource']), + ('buildbot.changes.gitpoller', ['GitPoller']), + ('buildbot.changes.hgpoller', ['HgPoller']), + ('buildbot.changes.p4poller', ['P4Source']), + ('buildbot.changes.pb', ['PBChangeSource']), + ('buildbot.changes.svnpoller', ['SVNPoller']) + ]) + ]) } # set zip_safe to false to force Windows installs to always unpack eggs