fix(packaging): move templates into core/ for PyPI distribution

Templates were at project root (templates/) which is outside the Python
package, so `pip install mcphub-server` would not include them. Moved to
core/templates/ and updated path references in server.py and
core/dashboard/routes.py. Also added py-modules for server.py and
server_multi.py to pyproject.toml.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
airano
2026-02-18 02:41:28 +03:30
parent 5e0441c85e
commit 7daf604a32
18 changed files with 16 additions and 9 deletions

View File

@@ -16,10 +16,8 @@ from .auth import get_dashboard_auth
logger = logging.getLogger(__name__)
# Templates directory
TEMPLATES_DIR = os.path.join(
os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "templates"
)
# Templates directory (core/templates/ — one level up from core/dashboard/)
TEMPLATES_DIR = os.path.join(os.path.dirname(os.path.dirname(__file__)), "templates")
templates = Jinja2Templates(directory=TEMPLATES_DIR)
# Plugin display names mapping (for special cases like n8n)