fix: build_openclaw 排除 __pycache__,清理 dist 运行时残留

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
wangzhuc 2026-03-30 13:35:29 +08:00
parent 4c842c4a08
commit ca502cf6d3
2 changed files with 6 additions and 2 deletions

View file

@ -104,7 +104,9 @@ def build(output_dir: Path):
if src.is_dir():
if dst.exists():
shutil.rmtree(dst)
shutil.copytree(src, dst)
shutil.copytree(src, dst, ignore=shutil.ignore_patterns(
"__pycache__", "*.pyc", "*.pyo",
))
print(f" {d}/ → {dst}")
# Copy supporting files

View file

@ -104,7 +104,9 @@ def build(output_dir: Path):
if src.is_dir():
if dst.exists():
shutil.rmtree(dst)
shutil.copytree(src, dst)
shutil.copytree(src, dst, ignore=shutil.ignore_patterns(
"__pycache__", "*.pyc", "*.pyo",
))
print(f" {d}/ → {dst}")
# Copy supporting files