diff --git a/.gitignore b/.gitignore index 0330f50..229a9aa 100644 --- a/.gitignore +++ b/.gitignore @@ -218,3 +218,4 @@ __marimo__/ # MeshCore Hub specific *.db meshcore.db +src/meshcore_hub/_version.py diff --git a/pyproject.toml b/pyproject.toml index 1a6b9af..d6f9dfb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,10 @@ [build-system] -requires = ["setuptools>=68.0", "wheel"] +requires = ["setuptools>=68.0", "wheel", "setuptools-scm>=8.0"] build-backend = "setuptools.build_meta" [project] name = "meshcore-hub" -version = "0.1.0" +dynamic = ["version"] description = "Python monorepo for managing and orchestrating MeshCore mesh networks" readme = "README.md" license = {text = "GPL-3.0-or-later"} @@ -68,6 +68,9 @@ Documentation = "https://github.com/ipnet-mesh/meshcore-hub#readme" Repository = "https://github.com/ipnet-mesh/meshcore-hub" Issues = "https://github.com/ipnet-mesh/meshcore-hub/issues" +[tool.setuptools_scm] +version_file = "src/meshcore_hub/_version.py" + [tool.setuptools.packages.find] where = ["src"] diff --git a/src/meshcore_hub/__init__.py b/src/meshcore_hub/__init__.py index 2febe3d..552bf5c 100644 --- a/src/meshcore_hub/__init__.py +++ b/src/meshcore_hub/__init__.py @@ -1,3 +1,5 @@ """MeshCore Hub - Python monorepo for managing MeshCore mesh networks.""" -__version__ = "0.1.0" +from meshcore_hub._version import __version__, __version_tuple__ + +__all__ = ["__version__", "__version_tuple__"]