fix(release): package Core migration runtime

This commit is contained in:
2026-07-22 10:34:34 +02:00
parent 59610e21d2
commit e6d589eb07
4 changed files with 157 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ import logging
import os
from pathlib import Path
import re
import sysconfig
from typing import Any
from alembic import command
@@ -462,11 +463,13 @@ def _jsonable_migration_task_details(value: Mapping[str, Any]) -> Mapping[str, A
def _repo_root() -> Path:
packaged_root = Path(__file__).resolve().parents[3]
installed_runtime_root = Path(sysconfig.get_path("data")) / "govoplan_core_runtime"
configured = os.environ.get("GOVOPLAN_CORE_SOURCE_ROOT")
candidates = [
Path(configured).expanduser() if configured else None,
Path.cwd(),
packaged_root,
installed_runtime_root,
]
for candidate in candidates:
if candidate is None: