Fix #117: include .md prompt files in wheel + handle Windows temp-dir cleanup
Fix 1: Add [tool.setuptools.package-data] to pyproject.toml so that all .md prompt files (generic prompts under skillopt/prompts/ and env-specific prompts under skillopt/envs/*/prompts/) are included in the wheel. Previously pip install from PyPI would fail with FileNotFoundError on first prompt load. Fix 2: Replace TemporaryDirectory context manager with mkdtemp + shutil.rmtree(ignore_errors=True) in claude_backend._run_claude_print. On Windows, the spawned claude/node subprocess still holds a handle on the temp directory when the context manager tries to clean up, causing WinError 32. Manual rmtree with ignore_errors=True works on all Python versions >= 3.10. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -73,6 +73,9 @@ Issues = "https://github.com/microsoft/SkillOpt/issues"
|
||||
# skillopt_webui = the Gradio dashboard (installed via the `webui` extra)
|
||||
include = ["skillopt", "skillopt.*", "skillopt_sleep", "skillopt_sleep.*", "skillopt_webui", "skillopt_webui.*", "scripts*"]
|
||||
|
||||
[tool.setuptools.package-data]
|
||||
"*" = ["*.md"]
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 120
|
||||
target-version = "py310"
|
||||
|
||||
Reference in New Issue
Block a user