def tar_gz_dir()

in tools/travis/box-upload.py [0:0]


def tar_gz_dir(dir_path):
    """Create TAR (ZIP) of path and its contents."""
    _, dst = tempfile.mkstemp(suffix=".tar.gz")
    subprocess.call(["tar", "-cvzf", dst, dir_path])
    return dst