Skip to content

armgit / SOMA

Public Imported from GitHub
0

Desktop app for designing parametric 3D models in CadQuery together with the coding agent of your choice

soma: Versionsnummer an einer Stelle, pyproject liest sie aus __init__.py (E68)

Kai-Jungsthoefel13c82851c69d
diff --git a/python/pyproject.toml b/python/pyproject.toml
index fef62b8..6b62214 100644
--- a/python/pyproject.toml
+++ b/python/pyproject.toml
@@ -4,7 +4,8 @@ build-backend = "setuptools.build_meta"
[project]
name = "soma"
-version = "0.1.0"
+# Versionsnummer von SOMA (E68), eine fuer App und soma: steht in soma/__init__.py und gleichlautend in app/package.json
+dynamic = ["version"]
description = "Hilfsbibliothek und Kommandozeile von SOMA"
requires-python = ">=3.11"
# cadquery liegt in der mitgelieferten Basisumgebung und wird hier bewusst nicht als Abhaengigkeit gezogen
@@ -15,6 +16,9 @@ soma = "soma.cli:main"
[tool.setuptools]
packages = ["soma"]
+[tool.setuptools.dynamic]
+version = { attr = "soma.__version__" }
+
[tool.setuptools.package-data]
# Masstabellen der Normteile (aus bd_warehouse, Apache 2.0)
soma = ["data/fasteners/*"]
diff --git a/python/soma/__init__.py b/python/soma/__init__.py
index 4564014..3b831d1 100644
--- a/python/soma/__init__.py
+++ b/python/soma/__init__.py
@@ -6,7 +6,7 @@ import time as _time
# Vor dem Import von cadquery (dauert Sekunden): `soma build` meldet die ganze Wartezeit, nicht nur das Modell
_STARTED = _time.perf_counter()
-__version__ = "0.1.0"
+__version__ = "0.1.0" # Major.minor.bugfix (E68), eine Nummer fuer App und soma, gleich der in app/package.json
API_VERSION = 1 # steht in .soma/project.json, sichert Abwaertskompatibilitaet (E36)
__all__ = ["add_part", "import_assembly", "import_step", "__version__", "API_VERSION"]