代码拉取完成,页面将自动刷新
import shutil
from pathlib import Path
# Clean up after installing for local development
def clean():
# Get the current directory
base_dir = Path.cwd()
# Directories and patterns to clean
cleanup_patterns = [
"build",
"dist",
"*.egg-info",
"__pycache__",
".eggs",
".pytest_cache",
]
# Clean directories
for pattern in cleanup_patterns:
for path in base_dir.glob(pattern):
try:
if path.is_dir():
shutil.rmtree(path)
else:
path.unlink()
print(f"Removed: {path}")
except Exception as e:
print(f"Could not remove {path}: {e}")
# Remove compiled Python files
for path in base_dir.rglob("*.py[co]"):
try:
path.unlink()
print(f"Removed compiled file: {path}")
except Exception as e:
print(f"Could not remove {path}: {e}")
if __name__ == "__main__":
clean()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。