14 lines
373 B
Python
14 lines
373 B
Python
#!/usr/bin/env python3
|
|
"""Remove generated Python work from this checkout."""
|
|
|
|
from pathlib import Path
|
|
import shutil
|
|
|
|
|
|
cache = Path(__file__).resolve().parent / "__pycache__"
|
|
if cache.exists():
|
|
if cache.is_symlink() or cache.name != "__pycache__":
|
|
raise SystemExit("unsafe Python cache path")
|
|
shutil.rmtree(cache)
|
|
print("Removed site CI Python cache")
|