Mercurial > hg > autobot
changeset 23:a32a7055f3e6
combine variables for buildbot master+slave
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Fri, 07 Jan 2011 18:19:04 -0800 |
parents | a7e2f5b2a7e9 |
children | fe1bb4c667bc |
files | autobot/template.py setup.py |
diffstat | 2 files changed, 5 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/autobot/template.py Fri Jan 07 17:07:02 2011 -0800 +++ b/autobot/template.py Fri Jan 07 18:19:04 2011 -0800 @@ -7,6 +7,7 @@ import os import sys from makeitso.cli import MakeItSoCLI +from makeitso.template import assemble from makeitso.template import MakeItSoTemplate from makeitso.template import Variable from projects import factories @@ -67,24 +68,11 @@ print ' '.join(command) call(command) -class AutobotTemplate(MakeItSoTemplate): +class AutobotTemplate(AutobotMasterTemplate, AutobotSlaveTemplate): name = 'autobot' description = 'template for the autotools buildbot master+slave' templates = ['template'] - def __init__(self, **kwargs): - - # get the variables - # TODO: move this upstream - names = set() - for variable in AutobotMasterTemplate.vars: - names.add(variable.name) - self.vars.append(variable.copy()) - for variable in AutobotSlaveTemplate.vars: - if variable.name not in names: - self.vars.append(variable.copy()) - MakeitSoTemplate.__init__(self, **kwargs) - - + vars = assemble(AutobotMasterTemplate, AutobotSlaveTemplate) # CLI front end functions # (console_script entry points) @@ -100,7 +88,7 @@ template.substitute() def create_autobot(args=sys.argv[1:]): - cli = MakeItSoCLI(AutobotSlaveTemplate) + cli = MakeItSoCLI(AutobotTemplate) template = cli.parse() template.substitute()
--- a/setup.py Fri Jan 07 17:07:02 2011 -0800 +++ b/setup.py Fri Jan 07 18:19:04 2011 -0800 @@ -26,6 +26,7 @@ entry_points=""" # -*- Entry points: -*- [console_scripts] + create-autobot = autobot.template:create_autobot create-autobot-master = autobot.template:create_master create-autobot-slave = autobot.template:create_slave """,