Ejemplo n.º 1
0
def main(args=None):
    args = parse_args(args)
    if args.subparser_name in ('extract', 'x'):
        if args.info:
            api.extract(args.archive_path, args.dest, components='info')
        else:
            api.extract(args.archive_path, args.dest)
    elif args.subparser_name in ('create', 'c'):
        api.bundle(args.prefix, args.file_list, args.out_fn, args.out_folder)
    elif args.subparser_name in ('transmute', 't'):
        api.transmute(args.in_file, args.out_ext, args.out_folder)
    else:
        raise NotImplementedError("Command {} is not implemented".format(args.subparser_name))
Ejemplo n.º 2
0
def test_api_transmute_conda_v2_to_tarball(testing_workdir):
    condafile = os.path.join(data_dir, test_package_name + '.conda')
    api.transmute(condafile, '.tar.bz2', testing_workdir)
    assert os.path.isfile(os.path.join(testing_workdir, test_package_name + '.tar.bz2'))
Ejemplo n.º 3
0
def test_api_transmute_tarball_to_conda_v2(testing_workdir):
    tarfile = os.path.join(data_dir, test_package_name + '.tar.bz2')
    errors = api.transmute(tarfile, '.conda', testing_workdir)
    assert not errors
    assert os.path.isfile(os.path.join(testing_workdir, test_package_name + '.conda'))