Skip to content

Commit 7e3ed3b

Browse files
committed
modern python packaging - remove setup.py and have single source of truth for library's version
1 parent cb92cc2 commit 7e3ed3b

File tree

3 files changed

+10
-47
lines changed

3 files changed

+10
-47
lines changed

fastapi_mcp/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44
Created by Tadata Inc. (https://github.com/tadata-org)
55
"""
66

7-
__version__ = "0.1.7"
7+
try:
8+
from importlib.metadata import version
9+
10+
__version__ = version("fastapi-mcp")
11+
except Exception:
12+
# Fallback for local development
13+
__version__ = "0.0.0.dev0"
814

915
from .server import add_mcp_server, create_mcp_server, mount_mcp_server
1016
from .http_tools import create_mcp_tools_from_openapi

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ Documentation = "https://github.com/tadata-org/fastapi_mcp#readme"
5050
[project.scripts]
5151
fastapi-mcp = "fastapi_mcp.cli:app"
5252

53+
[tool.hatch.build.targets.wheel]
54+
packages = ["fastapi_mcp"]
55+
5356
[tool.ruff]
5457
line-length = 120
5558
target-version = "py310"

setup.py

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)