From 3e5a9db125a812434fab514a6bc39ba151b8cfa8 Mon Sep 17 00:00:00 2001 From: "ling.zhu" <249002031@qq.com> Date: Mon, 15 Jun 2026 15:04:06 +0800 Subject: [PATCH] fix pip install . error --- MANIFEST.in | 1 + pyproject.toml | 5 ++++- templates/__init__.py | 0 templates/dashboard/__init__.py | 0 thoth/init/migration.py | 4 ++-- 5 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 MANIFEST.in create mode 100644 templates/__init__.py create mode 100644 templates/dashboard/__init__.py diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..0771547 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +graft templates diff --git a/pyproject.toml b/pyproject.toml index b3d81dc..ca0c8eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,4 +38,7 @@ markers = [ ] [tool.setuptools.packages.find] -include = ["thoth*"] +include = ["thoth*", "templates*"] + +[tool.setuptools.package-data] +templates = ["**/*"] diff --git a/templates/__init__.py b/templates/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/templates/dashboard/__init__.py b/templates/dashboard/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/thoth/init/migration.py b/thoth/init/migration.py index f2c677a..7a9951a 100644 --- a/thoth/init/migration.py +++ b/thoth/init/migration.py @@ -29,11 +29,11 @@ LEGACY_REMOVE_PATHS = [LEGACY_CONFIG_FILE, ".agent-os/research-tasks", "tests/test_validate.py", "tests/test_check_consistency.py", "tests/test_sync_todo.py", "tests/test_verify_completion.py"] DISCOVERY_CODE_SUFFIXES = {".py", ".js", ".ts", ".tsx", ".vue", ".sh", ".rs", ".go", ".java", ".c", ".cc", ".cpp", ".h", ".hpp"} THOTH_CLAUDE_BASH_ALLOW_PATTERN = "Bash(*thoth-claude-command.sh*)" -BACKUP_SKIP_DIRS = {"__pycache__", ".pytest_cache", "node_modules", "dist"} +BACKUP_SKIP_NAMES = {"__pycache__", ".pytest_cache", "node_modules", "dist", "__init__.py"} def _backup_ignore(_directory: str, names: list[str]) -> set[str]: - return {name for name in names if name in BACKUP_SKIP_DIRS} + return {name for name in names if name in BACKUP_SKIP_NAMES} def _backup_existing_path(project_dir: Path, migration_dir: Path, relpath: str) -> None: source = project_dir / relpath