def conda_build(recipes, dir='.', batch_mode=False, which_conda=None):
    conda = which_conda or which('conda')
    env = {
        'PATH':
        os.pathsep.join([
            '/usr/bin',
            '/bin',
            '/usr/sbin',
            '/etc',
            '/usr/lib',
        ]),
    }

    files_to_upload = []
    with cd(dir):
        with homebrew_hidden(prompt=not batch_mode):
            with setenv(env, verbose=True):
                status('pwd: {dir}'.format(dir=dir))
                system([conda, 'clean', '--all'])
                for recipe in recipes:
                    try:
                        system([
                            conda, 'build', '-c', 'conda-forge', '-c',
                            'csdms/channel/dev', recipe
                        ])
                    except CalledProcessError:
                        break
                    else:
                        files_to_upload.append(
                            conda_build_output(recipe, which_conda=conda))

    return files_to_upload
Exemple #2
0
def conda_upload(files):
    uploaded = []
    for fname in files:
        try:
            system(['anaconda', 'upload', '--no-progress', '--force',
                    '--channel', 'nightly', '--user', 'csdms', fname])
        except CalledProcessError:
            pass
        else:
            success('uploaded: {fname}'.format(fname=fname))
    return uploaded
def conda_upload(files):
    uploaded = []
    for fname in files:
        try:
            system([
                'anaconda', 'upload', '--no-progress', '--force', '--channel',
                'nightly', '--user', 'csdms', fname
            ])
        except CalledProcessError:
            pass
        else:
            success('uploaded: {fname}'.format(fname=fname))
    return uploaded
Exemple #4
0
def conda_build(recipes, dir='.', batch_mode=False, which_conda=None):
    conda = which_conda or which('conda')
    env = {
        'PATH': os.pathsep.join(['/usr/bin', '/bin', '/usr/sbin', '/etc',
                                 '/usr/lib', ]), }

    files_to_upload = []
    with cd(dir):
        with homebrew_hidden(prompt=not batch_mode):
            with setenv(env, verbose=True):
                status('pwd: {dir}'.format(dir=dir))
                system([conda, 'clean', '--all'])
                for recipe in recipes:
                    try:
                        system([conda, 'build', '-c', 'conda-forge',
                                '-c', 'csdms/channel/dev', recipe])
                    except CalledProcessError:
                        break
                    else:
                        files_to_upload.append(
                            conda_build_output(recipe, which_conda=conda))

    return files_to_upload