fix: build_openclaw 排除 __pycache__,清理 dist 运行时残留
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4c842c4a08
commit
ca502cf6d3
2 changed files with 6 additions and 2 deletions
4
dist/openclaw/scripts/build_openclaw.py
vendored
4
dist/openclaw/scripts/build_openclaw.py
vendored
|
|
@ -104,7 +104,9 @@ def build(output_dir: Path):
|
||||||
if src.is_dir():
|
if src.is_dir():
|
||||||
if dst.exists():
|
if dst.exists():
|
||||||
shutil.rmtree(dst)
|
shutil.rmtree(dst)
|
||||||
shutil.copytree(src, dst)
|
shutil.copytree(src, dst, ignore=shutil.ignore_patterns(
|
||||||
|
"__pycache__", "*.pyc", "*.pyo",
|
||||||
|
))
|
||||||
print(f" {d}/ → {dst}")
|
print(f" {d}/ → {dst}")
|
||||||
|
|
||||||
# Copy supporting files
|
# Copy supporting files
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,9 @@ def build(output_dir: Path):
|
||||||
if src.is_dir():
|
if src.is_dir():
|
||||||
if dst.exists():
|
if dst.exists():
|
||||||
shutil.rmtree(dst)
|
shutil.rmtree(dst)
|
||||||
shutil.copytree(src, dst)
|
shutil.copytree(src, dst, ignore=shutil.ignore_patterns(
|
||||||
|
"__pycache__", "*.pyc", "*.pyo",
|
||||||
|
))
|
||||||
print(f" {d}/ → {dst}")
|
print(f" {d}/ → {dst}")
|
||||||
|
|
||||||
# Copy supporting files
|
# Copy supporting files
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue