Skip to content

Commit 11c8835

Browse files
authored
add dynamic versioning to both projects (#31)
1 parent 25eccbd commit 11c8835

File tree

7 files changed

+55
-16
lines changed

7 files changed

+55
-16
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ yalc.lock
1616
./build/
1717
playwright-report/
1818
.env/
19+
_version.pyi
1920

2021
# codecov binary
2122
codecov

python/thirdweb-ai/pyproject.toml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "thirdweb-ai"
3-
version = "0.1.10"
3+
dynamic = ["version", "dependencies"]
44
description = "thirdweb AI"
55
authors = [{ name = "thirdweb", email = "support@thirdweb.com" }]
66
requires-python = ">=3.10,<4.0"
@@ -15,13 +15,6 @@ keywords = [
1515
"web3",
1616
"onchain",
1717
]
18-
dependencies = [
19-
"pydantic>=2.10.6,<3",
20-
"jsonref>=1.1.0,<2",
21-
"httpx>=0.28.1,<0.29",
22-
"aiohttp>=3.11.14",
23-
"web3>=7.9.0",
24-
]
2518

2619
[project.optional-dependencies]
2720
all = [
@@ -66,9 +59,32 @@ include = ["src/thirdweb_ai"]
6659
"src/thirdweb_ai" = "thirdweb_ai"
6760

6861
[build-system]
69-
requires = ["hatchling"]
62+
requires = ["hatchling", "uv-dynamic-versioning"]
7063
build-backend = "hatchling.build"
7164

65+
[tool.hatch.version]
66+
source = "uv-dynamic-versioning"
67+
68+
[tool.hatch.build.hooks.version]
69+
path = "src/thirdweb_ai/_version.py"
70+
template = '''
71+
version = "{version}"
72+
'''
73+
74+
[tool.hatch.metadata.hooks.uv-dynamic-versioning]
75+
dependencies = [
76+
"thirdweb-mcp=={{ version }}",
77+
"pydantic>=2.10.6,<3",
78+
"jsonref>=1.1.0,<2",
79+
"httpx>=0.28.1,<0.29",
80+
"aiohttp>=3.11.14",
81+
"web3>=7.9.0",
82+
]
83+
84+
[tool.uv-dynamic-versioning]
85+
vcs = "git"
86+
style = "semver"
87+
7288
[tool.pyright]
7389
include = ["src"]
7490
typeCheckingMode = "strict"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
from ._version import version
12
from .services.engine import Engine
23
from .services.insight import Insight
34
from .services.nebula import Nebula
45
from .services.storage import Storage
56
from .tools.tool import Tool
67

8+
__version__ = version
79
__all__ = ["Engine", "Insight", "Nebula", "Storage", "Tool"]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version = "0.0.0.post33+25eccbd"

python/thirdweb-mcp/pyproject.toml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
[project]
22
name = "thirdweb-mcp"
3-
version = "0.1.14"
3+
dynamic = ["version", "dependencies"]
44
description = "thirdweb MCP"
55
authors = [{ name = "thirdweb", email = "support@thirdweb.com" }]
66
requires-python = "~=3.10"
77
readme = "README.md"
88
license = "Apache-2.0"
9-
dependencies = [
10-
"mcp>=1.3.0,<2",
11-
"click>=8.1.8,<9",
12-
"thirdweb-ai[mcp]==0.1.10",
13-
]
149

1510
[project.scripts]
1611
thirdweb-mcp = "src.mcp:main"
@@ -28,5 +23,25 @@ include = ["src"]
2823
include = ["src"]
2924

3025
[build-system]
31-
requires = ["hatchling"]
26+
requires = ["hatchling", "uv-dynamic-versioning"]
3227
build-backend = "hatchling.build"
28+
29+
[tool.hatch.version]
30+
source = "uv-dynamic-versioning"
31+
32+
[tool.hatch.build.hooks.version]
33+
path = "src/_version.py"
34+
template = '''
35+
version = "{version}"
36+
'''
37+
38+
[tool.hatch.metadata.hooks.uv-dynamic-versioning]
39+
dependencies = [
40+
"mcp>=1.3.0,<2",
41+
"click>=8.1.8,<9",
42+
"thirdweb-ai[mcp]=={{ version }}",
43+
]
44+
45+
[tool.uv-dynamic-versioning]
46+
vcs = "git"
47+
style = "semver"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from ._version import version
2+
3+
__version__ = version
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version = "0.0.0.post33.dev0+25eccbd"

0 commit comments

Comments
 (0)