# HG changeset patch # User Jeff Hammel # Date 1294342108 28800 # Node ID a3374cdd116d5cc39863d1725d204fc9095b7c27 # Parent 3bd7f767d74a99153454cc5958c4d87ee268835f stub out more needed for python projects diff -r 3bd7f767d74a -r a3374cdd116d autobot/process/factory.py --- a/autobot/process/factory.py Wed Jan 05 18:17:09 2011 -0800 +++ b/autobot/process/factory.py Thu Jan 06 11:28:28 2011 -0800 @@ -10,7 +10,7 @@ create a virtualenv """ - def __init__(self, name='env', hg_sources=None): + def __init__(self, name='env', hg_sources=()): """ - name : of the virtualenv - hg_sources : sources of python packages with setuptools setup.pys @@ -21,6 +21,28 @@ directory=name)) # TODO: set properities: # - python location + # - virtualenv location + + # clone hg repositories for hg_source in hg_sources: self.addStep(ShellCommand(command=['hg', 'clone', hg_source], directory=name + '/src')) + + +class PythonSourceFactory(VirtualenvFactory): + """ + setup several python packages + """ + + def __init__(self, name='env', hg_sources=()): + + # setup the environment + VirtualenvFactory.__init__(self, name=name, hg_sources=hg_sources) + + # install the packages + + +# python sources: +# [{'source': 'http://hg.mozilla.org/....', +# 'type': 'hg', # or git, +# }] diff -r 3bd7f767d74a -r a3374cdd116d autobot/projects/logparser/__init__.py --- a/autobot/projects/logparser/__init__.py Wed Jan 05 18:17:09 2011 -0800 +++ b/autobot/projects/logparser/__init__.py Thu Jan 06 11:28:28 2011 -0800 @@ -6,6 +6,12 @@ http://hg.mozilla.org/automation/logparser/ """ def __init__(self): + + # setup the environment VirtualenvFactory.__init__(self, name='logparser', hg_sources=['http://hg.mozilla.org/automation/logparser/']) - + + # install the python + # TODO: utilize PythonSourceFactory + + # run the tests