mathlibtools/lib.py
def pack(root: Path, srcs: Iterable[Path], target: Path) -> None:
    """Creates, as target, a tar.xz archive containing all paths from src,
    relative to the folder root"""
    try:
        target.unlink()
    except FileNotFoundError:
        pass
    cur_dir = Path.cwd()
    with DelayedInterrupt([signal.SIGTERM, signal.SIGINT]):
        os.chdir(str(root))
        ar = tarfile.open(str(target), 'w|xz')
        for src in srcs:
            ar.add(str(src.relative_to(root)))
        ar.close()
    os.chdir(str(cur_dir))
Creates, as target, a tar.xz archive containing all paths from src,
    relative to the folder root
Creates, as target, a tar.xz archive containing all paths from src,
relative to the folder root
Creates as target a tar . xz archive containing all paths from src relative to the folder root
def pack(root: Path, srcs: Iterable[Path], target: Path) -> None:
    try:
        target.unlink()
    except FileNotFoundError:
        pass
    cur_dir = Path.cwd()
    with DelayedInterrupt([signal.SIGTERM, signal.SIGINT]):
        os.chdir(str(root))
        ar = tarfile.open(str(target), 'w|xz')
        for src in srcs:
            ar.add(str(src.relative_to(root)))
        ar.close()
    os.chdir(str(cur_dir))
def pack ( root : Path , srcs : Iterable [ Path ] , target : Path ) -> None : try : target . unlink ( ) except FileNotFoundError : pass cur_dir = Path . cwd ( ) with DelayedInterrupt ( [ signal . SIGTERM , signal . SIGINT ] ) : os . chdir ( str ( root ) ) ar = tarfile . open ( str ( target ) , 'w|xz' ) for src in srcs : ar . add ( str ( src . relative_to ( root ) ) ) ar . close ( ) os . chdir ( str ( cur_dir ) )
Creates, as target, a tar.xz archive containing all paths from src,
relative to the folder root
Creates as target a tar . xz archive containing all paths from src relative to the folder root
"""Creates, as target, a tar.xz archive containing all paths from src,
    relative to the folder root"""
root
Path
srcs
Iterable[Path]
target
Path