build: derive package version from git via setuptools-scm
Replace hatchling and the static version with setuptools + setuptools-scm, following Kaya's pre-uv packaging setup: dynamic version, generated _version.py, and release/* tag prefix. The Docker builder now includes git and the .git directory so the image is versioned from the checkout. CI checks out full history and tags for the tag-triggered builds.
This commit is contained in:
+11
-5
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "xmcp"
|
||||
version = "0.2.0"
|
||||
dynamic = ["version"]
|
||||
description = "MCP server generated from an OpenAPI specification, built with FastMCP"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.14"
|
||||
@@ -14,8 +14,14 @@ dependencies = [
|
||||
xmcp = "xmcp.server:main"
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
requires = ["setuptools>=61.0", "setuptools-scm>=8"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/xmcp"]
|
||||
[tool.setuptools.packages.find]
|
||||
where = ["src"]
|
||||
|
||||
[tool.setuptools_scm]
|
||||
version_file = "src/xmcp/_version.py"
|
||||
|
||||
[tool.setuptools_scm.tag]
|
||||
prefix = "release/"
|
||||
|
||||
Reference in New Issue
Block a user