Ejemplo n.º 1
0
def __install(app,
              app_name,
              app_version,
              install_directory,
              cache_directory,
              download_url,
              arguments):
    log.info('installing %s-%s' % (app_name, app_version))
    app_directory = '%s/%s' % (install_directory, app_name)
    if not os.path.exists(app_directory):
        os.makedirs(app_directory)

    final_directory = '%s/%s' % (app_directory, app_version)

    if os.path.exists(final_directory):
        raise Exception('%s-%s already installed' % (app_name, app_version))

    out_directory = '%s/%s' % (cache_directory, app_name)
    if os.path.exists(out_directory):
        shutil.rmtree(out_directory)
    os.makedirs(out_directory)

    retrieve(download_url, cache_directory, out_directory)

    final_directory = '%s/%s' % (app_directory, app_version)
    app.install(out_directory, final_directory, arguments)
Ejemplo n.º 2
0
 def info(self, stepname, message):
     log.info('%s: %s' % (stepname, message))