def get_manager(download=False):
    package = get_conf('manager')

    dl_handler = WgetHandler()
    common = CommonHandler()
    py_handler = PythonHandler()
    _prepare(package)
    py_handler.venv(package['sources_path'])
    tar_file = '{0}/{1}.tar.gz'.format(package['sources_path'],
                                       package['name'])
    for url in package['source_urls']:
        dl_handler.download(url, file=tar_file)
    common.untar(package['sources_path'], tar_file)

    common.mkdir(package['file_server_dir'])
    common.cp(package['resources_path'], package['file_server_dir'])
    if download:
        for module in package['modules']:
            py_handler.pip(module, package['sources_path'])
def get_manager(download=False):
    package = get_conf('manager')

    dl_handler = WgetHandler()
    common = CommonHandler()
    py_handler = PythonHandler()
    _prepare(package)
    py_handler.venv(package['sources_path'])
    tar_file = '{0}/{1}.tar.gz'.format(
        package['sources_path'], package['name'])
    for url in package['source_urls']:
        dl_handler.download(url, file=tar_file)
    common.untar(package['sources_path'], tar_file)

    common.mkdir(package['file_server_dir'])
    common.cp(package['resources_path'], package['file_server_dir'])
    if download:
        for module in package['modules']:
            py_handler.pip(module, package['sources_path'])
def _prepare(package):

    common = CommonHandler()
    common.rmdir(package['sources_path'])
    common.mkdir('{}/archives'.format(package['sources_path']))
    common.mkdir(package['package_path'])
def _prepare(package):

    common = CommonHandler()
    common.rmdir(package['sources_path'])
    common.mkdir('{}/archives'.format(package['sources_path']))
    common.mkdir(package['package_path'])