Пример #1
0
def extract_libs():
    for name, lib in libs.items():
        if name == "openjpeg":
            filename = check_hash(lib["filename"], lib["hash"])
            for compiler in compilers.values():
                if not os.path.exists(os.path.join(build_dir, lib["dir"] + compiler["inc_dir"])):
                    extract(filename, build_dir)
                    os.rename(
                        os.path.join(build_dir, lib["dir"]), os.path.join(build_dir, lib["dir"] + compiler["inc_dir"])
                    )
        else:
            extract(check_hash(lib["filename"], lib["hash"]), build_dir)
Пример #2
0
def extract_libs():
    for name, lib in libs.items():
        filename = lib['filename']
        if name == 'openjpeg':
            for compiler in compilers.values():
                if not os.path.exists(os.path.join(
                        build_dir, lib['dir']+compiler['inc_dir'])):
                    extract(filename, build_dir)
                    os.rename(os.path.join(build_dir, lib['dir']),
                              os.path.join(
                                  build_dir, lib['dir']+compiler['inc_dir']))
        else:
            extract(filename, build_dir)
Пример #3
0
def fetch_libs():
    for name, lib in libs.items():
        if name == 'openjpeg':
            filename = check_hash(fetch(lib['url']), lib['hash'])
            for compiler in compilers.values():
                if not os.path.exists(os.path.join(
                        build_dir, lib['dir']+compiler['inc_dir'])):
                    extract(filename, build_dir)
                    os.rename(os.path.join(build_dir, lib['dir']),
                              os.path.join(
                                  build_dir, lib['dir']+compiler['inc_dir']))
        else:
            extract(check_hash(fetch(lib['url']), lib['hash']), build_dir)
Пример #4
0
def mkdirs():
    try:
        os.mkdir(build_dir)
    except OSError:
        pass
    try:
        os.mkdir(inc_dir)
    except OSError:
        pass
    for compiler in compilers.values():
        try:
            os.mkdir(os.path.join(inc_dir, compiler['inc_dir']))
        except OSError:
            pass
Пример #5
0
def extract_libs():
    for name, lib in libs.items():
        filename = lib['filename']
        if not os.path.exists(filename):
            filename = fetch(lib['url'])
        if name == 'openjpeg':
            for compiler in compilers.values():
                if not os.path.exists(os.path.join(
                        build_dir, lib['dir']+compiler['inc_dir'])):
                    extract(filename, build_dir)
                    os.rename(os.path.join(build_dir, lib['dir']),
                              os.path.join(
                                  build_dir, lib['dir']+compiler['inc_dir']))
        else:
            extract(filename, build_dir)