Пример #1
0
 def execution_handler(*args, **kwargs):
     client = CommonHandler()
     client.rmdir(TEST_DIR, sudo=False)
     do('mkdir -p ' + TEST_DIR, sudo=False)
     do('touch ' + TEST_FILE, sudo=False)
     func(*args, **kwargs)
     client.rmdir(TEST_DIR, sudo=False)
Пример #2
0
 def execution_handler(*args, **kwargs):
     client = CommonHandler()
     template_file = TEST_TEMPLATES_DIR + '/' + TEST_TEMPLATE_FILE
     do('mkdir -p ' + TEST_TEMPLATES_DIR, sudo=False)
     with open(template_file, 'w+') as f:
         f.write(MOCK_TEMPLATE_CONTENTS)
     func(*args, **kwargs)
     client.rm(template_file, sudo=False)
Пример #3
0
 def execution_handler(*args, **kwargs):
     client = CommonHandler()
     packages_file = TEST_TEMPLATES_DIR + '/' + MOCK_PACKAGES_FILE
     do('mkdir -p ' + TEST_TEMPLATES_DIR, sudo=False)
     with open(packages_file, 'w+') as f:
         f.write(MOCK_PACKAGES_CONTENTS)
     func(*args, **kwargs)
     client.rm(packages_file, sudo=False)
     client.rm(packages_file + 'c', sudo=False)
def get_celery(download=False):
    package = get_conf('celery')

    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)
    if download:
        for module in package['modules']:
            py_handler.pip(module, package['sources_path'])
def get_celery(download=False):
    package = get_conf('celery')

    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)
    if download:
        for module in package['modules']:
            py_handler.pip(module, package['sources_path'])
Пример #6
0
def _prepare(package):

    common = CommonHandler()
    common.rmdir(package['sources_path'])
    # DEPRACATE!
    common.make_package_paths(
        package['package_path'],
        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'])