kkpyutil 1.49.4__tar.gz → 1.50.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {kkpyutil-1.49.4 → kkpyutil-1.50.1}/PKG-INFO +1 -1
- {kkpyutil-1.49.4 → kkpyutil-1.50.1}/kkpyutil.py +2 -2
- {kkpyutil-1.49.4 → kkpyutil-1.50.1}/pyproject.toml +1 -1
- {kkpyutil-1.49.4 → kkpyutil-1.50.1}/LICENSE +0 -0
- {kkpyutil-1.49.4 → kkpyutil-1.50.1}/README.md +0 -0
- {kkpyutil-1.49.4 → kkpyutil-1.50.1}/kkpyutil_helper/windows/kkttssave.ps1 +0 -0
- {kkpyutil-1.49.4 → kkpyutil-1.50.1}/kkpyutil_helper/windows/kkttsspeak.ps1 +0 -0
|
@@ -2079,7 +2079,7 @@ def move_file(src, dst, isdstdir=False):
|
|
|
2079
2079
|
return dst if not isdstdir else osp.join(dst, osp.basename(src))
|
|
2080
2080
|
|
|
2081
2081
|
|
|
2082
|
-
def sync_dirs(src_root, dst_root, logger=glogger, sudo=False):
|
|
2082
|
+
def sync_dirs(src_root, dst_root, logger=glogger, sudo=False, excludes=()):
|
|
2083
2083
|
"""
|
|
2084
2084
|
- assume src and dst folders are the same level of folder tree
|
|
2085
2085
|
- the result will be dst_root mirrors src_root
|
|
@@ -2116,7 +2116,7 @@ def sync_dirs(src_root, dst_root, logger=glogger, sudo=False):
|
|
|
2116
2116
|
if os.path.isdir(src_path):
|
|
2117
2117
|
# copytree with dirs_exist_ok=True will overwrite existing files
|
|
2118
2118
|
# and merge directories without warning.
|
|
2119
|
-
shutil.copytree(src_path, dst_path, dirs_exist_ok=True)
|
|
2119
|
+
shutil.copytree(src_path, dst_path, dirs_exist_ok=True, copy_function=shutil.copy, ignore=shutil.ignore_patterns(*excludes) if excludes else None)
|
|
2120
2120
|
logger.info(f"Merged directory: {src_path} -> {dst_path}")
|
|
2121
2121
|
else:
|
|
2122
2122
|
# For individual files at the root of my_src_dir
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|