diff --git a/.gitignore b/.gitignore index 840af8f..1b44129 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ yalc.lock ./build/ playwright-report/ .env/ +_version.pyi # codecov binary codecov diff --git a/python/thirdweb-ai/pyproject.toml b/python/thirdweb-ai/pyproject.toml index 2f0da58..96c573d 100644 --- a/python/thirdweb-ai/pyproject.toml +++ b/python/thirdweb-ai/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "thirdweb-ai" -version = "0.1.10" +dynamic = ["version", "dependencies"] description = "thirdweb AI" authors = [{ name = "thirdweb", email = "support@thirdweb.com" }] requires-python = ">=3.10,<4.0" @@ -15,13 +15,6 @@ keywords = [ "web3", "onchain", ] -dependencies = [ - "pydantic>=2.10.6,<3", - "jsonref>=1.1.0,<2", - "httpx>=0.28.1,<0.29", - "aiohttp>=3.11.14", - "web3>=7.9.0", -] [project.optional-dependencies] all = [ @@ -66,9 +59,32 @@ include = ["src/thirdweb_ai"] "src/thirdweb_ai" = "thirdweb_ai" [build-system] -requires = ["hatchling"] +requires = ["hatchling", "uv-dynamic-versioning"] build-backend = "hatchling.build" +[tool.hatch.version] +source = "uv-dynamic-versioning" + +[tool.hatch.build.hooks.version] +path = "src/thirdweb_ai/_version.py" +template = ''' +version = "{version}" +''' + +[tool.hatch.metadata.hooks.uv-dynamic-versioning] +dependencies = [ + "thirdweb-mcp=={{ version }}", + "pydantic>=2.10.6,<3", + "jsonref>=1.1.0,<2", + "httpx>=0.28.1,<0.29", + "aiohttp>=3.11.14", + "web3>=7.9.0", +] + +[tool.uv-dynamic-versioning] +vcs = "git" +style = "semver" + [tool.pyright] include = ["src"] typeCheckingMode = "strict" diff --git a/python/thirdweb-ai/src/thirdweb_ai/__init__.py b/python/thirdweb-ai/src/thirdweb_ai/__init__.py index 381573a..92ced22 100644 --- a/python/thirdweb-ai/src/thirdweb_ai/__init__.py +++ b/python/thirdweb-ai/src/thirdweb_ai/__init__.py @@ -1,7 +1,9 @@ +from ._version import version from .services.engine import Engine from .services.insight import Insight from .services.nebula import Nebula from .services.storage import Storage from .tools.tool import Tool +__version__ = version __all__ = ["Engine", "Insight", "Nebula", "Storage", "Tool"] diff --git a/python/thirdweb-ai/src/thirdweb_ai/_version.py b/python/thirdweb-ai/src/thirdweb_ai/_version.py new file mode 100644 index 0000000..11da175 --- /dev/null +++ b/python/thirdweb-ai/src/thirdweb_ai/_version.py @@ -0,0 +1 @@ +version = "0.0.0.post33+25eccbd" diff --git a/python/thirdweb-mcp/pyproject.toml b/python/thirdweb-mcp/pyproject.toml index 5c80f7c..6cbec5f 100644 --- a/python/thirdweb-mcp/pyproject.toml +++ b/python/thirdweb-mcp/pyproject.toml @@ -1,16 +1,11 @@ [project] name = "thirdweb-mcp" -version = "0.1.14" +dynamic = ["version", "dependencies"] description = "thirdweb MCP" authors = [{ name = "thirdweb", email = "support@thirdweb.com" }] requires-python = "~=3.10" readme = "README.md" license = "Apache-2.0" -dependencies = [ - "mcp>=1.3.0,<2", - "click>=8.1.8,<9", - "thirdweb-ai[mcp]==0.1.10", -] [project.scripts] thirdweb-mcp = "src.mcp:main" @@ -28,5 +23,25 @@ include = ["src"] include = ["src"] [build-system] -requires = ["hatchling"] +requires = ["hatchling", "uv-dynamic-versioning"] build-backend = "hatchling.build" + +[tool.hatch.version] +source = "uv-dynamic-versioning" + +[tool.hatch.build.hooks.version] +path = "src/_version.py" +template = ''' +version = "{version}" +''' + +[tool.hatch.metadata.hooks.uv-dynamic-versioning] +dependencies = [ + "mcp>=1.3.0,<2", + "click>=8.1.8,<9", + "thirdweb-ai[mcp]=={{ version }}", +] + +[tool.uv-dynamic-versioning] +vcs = "git" +style = "semver" diff --git a/python/thirdweb-mcp/src/__init__.py b/python/thirdweb-mcp/src/__init__.py new file mode 100644 index 0000000..32495d2 --- /dev/null +++ b/python/thirdweb-mcp/src/__init__.py @@ -0,0 +1,3 @@ +from ._version import version + +__version__ = version diff --git a/python/thirdweb-mcp/src/_version.py b/python/thirdweb-mcp/src/_version.py new file mode 100644 index 0000000..a2d1be1 --- /dev/null +++ b/python/thirdweb-mcp/src/_version.py @@ -0,0 +1 @@ +version = "0.0.0.post33.dev0+25eccbd"