From 6a0cac5c4d8cdded830d4c9caba5436a5243fc8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20M=C3=B6ller?= Date: Wed, 20 Dec 2023 19:29:03 +0100 Subject: [PATCH] move version declaration to basyx.aas module This moves the version declaration to the basyx.aas module and imports it from there in the docs configuration and setup.py. This avoid having to change the version number in multiple locations. --- basyx/aas/__init__.py | 2 ++ docs/source/conf.py | 3 ++- setup.py | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/basyx/aas/__init__.py b/basyx/aas/__init__.py index 3273ea10d..2461fe523 100644 --- a/basyx/aas/__init__.py +++ b/basyx/aas/__init__.py @@ -6,3 +6,5 @@ in 'adapter', you can find JSON and XML adapters to translate between BaSyx Python SDK objects and JSON/XML schemas; and in 'util', some helpful functionality to actually use the AAS meta-model you created with 'model' is located. """ + +__version__ = "1.0.0" diff --git a/docs/source/conf.py b/docs/source/conf.py index b2db97a58..863135288 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -16,6 +16,7 @@ sys.path.insert(0, os.path.abspath('../..')) +from basyx.aas import __version__ # -- Project information ----------------------------------------------------- @@ -25,7 +26,7 @@ author = 'The Eclipse BaSyx Authors' # The full version, including alpha/beta/rc tags -release = '0.2.0' +release = __version__ # -- General configuration --------------------------------------------------- diff --git a/setup.py b/setup.py index 8a7b9a955..e2bf0023d 100755 --- a/setup.py +++ b/setup.py @@ -7,13 +7,14 @@ # SPDX-License-Identifier: MIT import setuptools +from basyx.aas import __version__ with open("README.md", "r", encoding='utf-8') as fh: long_description = fh.read() setuptools.setup( name="basyx-python-sdk", - version="1.0.0", + version=__version__, author="The Eclipse BaSyx Authors", description="The Eclipse BaSyx Python SDK, an implementation of the Asset Administration Shell for Industry 4.0 " "systems",