recipes.py
author Julien Cristau <julien.cristau@logilab.fr>
Wed, 18 Dec 2013 17:54:11 +0100
branchstable
changeset 1319 9ef256811ba1
parent 802 e08097e621ee
child 837 69daedbf31c8
child 978 dc456b5c147a
permissions -rw-r--r--
narval/piuparts: replace @DIST@ with the actual dist in apt repository uris

def create_quick_recipe(session):
    recipe = session.create_entity('Recipe', name=u'apycot.recipe.quick')
    init = recipe.add_step(u'action', u'apycot.init', initial=True)
    getdeps = init.add_next_step(u'action', u'apycot.get_dependencies')
    checkout = getdeps.add_next_step(u'action', u'apycot.checkout', for_each=u'projectenv')
    install = checkout.add_next_step(u'action', u'apycot.install', for_each=u'projectenv')
    pyunit = install.add_next_step(u'action', u'apycot.pyunit', final=True)

def create_full_recipe(session):
    recipe = session.create_entity('Recipe', name=u'apycot.recipe.full')
    init = recipe.add_step(u'action', u'apycot.init', initial=True)
    getdeps = init.add_next_step(u'action', u'apycot.get_dependencies')
    checkout = getdeps.add_next_step(u'action', u'apycot.checkout', for_each=u'projectenv')
    install = checkout.add_next_step(u'action', u'apycot.install', for_each=u'projectenv')
    pylint = recipe.add_step(u'action', u'apycot.pylint')
    pyunit = recipe.add_step(u'action', u'apycot.pyunit',
                             arguments=u'EnsureOptions(pycoverage=True)')
    recipe.add_transition(install, (pylint, pyunit))
    pycoverage = pyunit.add_next_step(u'action', u'apycot.pycoverage')
    recipe.add_transition((pylint, pycoverage),
                          recipe.add_step(u'action', u'basic.noop', final=True))
    return recipe