Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Dynamically read version information

Roland Geider46f059776b70
diff --git a/pyproject.toml b/pyproject.toml
index e1c47206e..51e39249d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,8 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "wger"
-version = "2.3.0a3"
-dynamic = ["dependencies"]
+dynamic = ["version", "dependencies"]
authors = [
{ name = "Roland Geider", email = "[email protected]" },
]
@@ -47,6 +46,11 @@ dependencies = { file = ["requirements.txt"] }
[tool.distutils.bdist_wheel]
universal = 1
+[tool.hatch.version]
+source = "code"
+path = "wger/__init__.py"
+expression = "get_version()"
+
[tool.ruff]
# Exclude a variety of commonly ignored directories.
diff --git a/wger/__init__.py b/wger/__init__.py
index d538badb0..64bf4b868 100644
--- a/wger/__init__.py
+++ b/wger/__init__.py
@@ -16,8 +16,7 @@
from packaging.version import Version
# Local
-from .celery_configuration import app
-
+from wger.celery_configuration import app
MIN_APP_VERSION = Version('1.8.0')
"""Minimum version of the mobile app required to access this server"""