# HG changeset patch # User Jeff Hammel # Date 1294691400 28800 # Node ID de3d2320df90b04eb3acb7d7150fc778a1b4c771 # Parent a39959f8c0a58ed7a9750efd51e679310180d3a8 add a python source factory and utilize it diff -r a39959f8c0a5 -r de3d2320df90 autobot/process/factory.py --- a/autobot/process/factory.py Mon Jan 10 12:24:00 2011 -0800 +++ b/autobot/process/factory.py Mon Jan 10 12:30:00 2011 -0800 @@ -67,14 +67,21 @@ # setup the environment VirtualenvFactory.__init__(self, name=name, hg_sources=hg_sources, git_sources=git_sources) - # install the packages + # install the packages + sources = [] for hg_source in hg_sources: package = hg_source.rstrip('/').rsplit('/', 1)[-1] + sources.append(package) + for git_source in git_sources: + package = hg_source.rstrip('/').rsplit('/', 1)[-1] + if package.endswith('.git'): + package = package[:-4] + sources.append(package) + for package in sources: self.addStep(ShellCommand(command=[WithProperties('%(python)s'), 'setup.py', 'install'], workdir=WithProperties('%(virtualenv)s/src/' + package), haltOnFailure=True)) - for git_source in git_sources: - pass # [TODO] + # python sources: # [{'source': 'http://hg.mozilla.org/....', diff -r a39959f8c0a5 -r de3d2320df90 autobot/projects/logparser/__init__.py --- a/autobot/projects/logparser/__init__.py Mon Jan 10 12:24:00 2011 -0800 +++ b/autobot/projects/logparser/__init__.py Mon Jan 10 12:30:00 2011 -0800 @@ -1,4 +1,4 @@ -from autobot.process.factory import VirtualenvFactory +from autobot.process.factory import PythonSourceFactory from buildbot.steps.shell import ShellCommand from buildbot.steps.shell import WithProperties @@ -10,8 +10,8 @@ def __init__(self): # setup the environment - VirtualenvFactory.__init__(self, name='logparser', - hg_sources=['http://hg.mozilla.org/automation/logparser/']) + PythonSourceFactory.__init__(self, name='logparser', + hg_sources=['http://hg.mozilla.org/automation/logparser/']) # install the python # TODO: utilize PythonSourceFactory