Exemple #1
0
def run_buildout(command):
    # Make sure we don't get .buildout
    os.environ['HOME'] = os.path.join(os.getcwd(), 'home')
    args = command.split()
    buildout = pkg_resources.load_entry_point('zc.buildout', 'console_scripts',
                                              args[0])
    buildout(args[1:])
def stage():
    """Update the local staged buildout
    """

    # Pull
    pull()

    # Update
    update()

    # Bootstrap
    bootstrap()

    # Buildout
    buildout()

    # Restart
    if _env.hostout.options.get('local-restart') == "true":
        local_sudo = _env.hostout.options.get('local-sudo') == "true"
        cmds = filter(bool, _env.hostout.options.get('restart').split('\n'))

        assert cmds, u'No restart commands found for the selected hostout'

        for cmd in cmds:
            if local_sudo:
                cmd = 'sudo {0:s}'.format(cmd)
            if _output.running:
                print('[localhost] restart: {0:s}'.format(cmd))
            _local(cmd)
Exemple #3
0
def run_buildout(command):
    # Make sure we don't get .buildout
    os.environ['HOME'] = os.path.join(os.getcwd(), 'home')
    args = command.split()
    import pkg_resources
    buildout = pkg_resources.load_entry_point(
        'zc.buildout', 'console_scripts', args[0])
    buildout(args[1:])