def get_mathlib(rev: str) -> None:
    """Get mathlib"""
    log.info('Cloning mathlib')
    repo = Repo.clone_from(
        'https://github.com/leanprover-community/mathlib.git',
        str(DIST_ALL / 'mathlib'))
    repo.git.checkout(rev)
    mathlib = LeanProject.from_path(DIST_ALL / 'mathlib')
    mathlib.get_cache()

    for dest in DISTS:
        shutil.copytree(DIST_ALL / 'mathlib', dest / 'mathlib')
        touch_olean(dest / 'mathlib')
Пример #2
0
def decls(ctx):
    proj = LeanProject.from_path(ROOT)
    proj.pickle_decls(ROOT / 'decls.pickle')
Пример #3
0
def proj() -> LeanProject:
    return LeanProject.from_path(Path('.'), cache_url, force_download,
                                 lean_upgrade)