예제 #1
0
def main(args):
    deps = args.deps or [d for d in all_deps if not has_pkg(d)]
    if not deps:
        print(
            'All dependencies already built, if you want to re-build, use the --clean option'
        )
        raise SystemExit(0)

    for dep in deps:
        if dep not in all_deps:
            raise SystemExit('%s is an unknown dependency' % dep)

    set_title('Downloading...')
    download(deps)

    other_deps = frozenset(all_deps) - frozenset(deps)
    dest_dir = init_env(other_deps)

    while deps:
        dep = deps.pop(0)
        ok = False
        try:
            build(dep, args, dest_dir)
            ok = True
        finally:
            if not ok:
                deps.insert(0, dep)
            if deps:
                print('Remaining deps:', ' '.join(deps))

    # After a successful build, remove the unneeded sw dir
    rmtree(dest_dir)
예제 #2
0
def main(args):
    deps = args.deps or [d for d in all_deps if not has_pkg(d)]
    if not deps:
        print('All dependencies already built, if you want to re-build, use the --clean option')
        raise SystemExit(0)

    for dep in deps:
        if dep not in all_deps:
            raise SystemExit('%s is an unknown dependency' % dep)

    set_title('Downloading...')
    download(deps)

    other_deps = frozenset(all_deps) - frozenset(deps)
    dest_dir = init_env(other_deps)

    while deps:
        dep = deps.pop(0)
        ok = False
        try:
            build(dep, args, dest_dir)
            ok = True
        finally:
            if not ok:
                deps.insert(0, dep)
            if deps:
                print('Remaining deps:', ' '.join(deps))

    # After a successful build, remove the unneeded sw dir
    rmtree(dest_dir)