Mercurial > hg > autobot
changeset 2:a3374cdd116d
stub out more needed for python projects
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Thu, 06 Jan 2011 11:28:28 -0800 |
parents | 3bd7f767d74a |
children | 1d615610e442 |
files | autobot/process/factory.py autobot/projects/logparser/__init__.py |
diffstat | 2 files changed, 30 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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, +# }]
--- 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