[core] Moved __version__ string to its own package.

It reduces the duplication of `__version__`, which before was defined
on:

- `setup.py`
- `setup.cfg`
- `platypush/__init__.py`
This commit is contained in:
Fabio Manganiello 2024-07-27 11:46:18 +02:00
parent dfe0092857
commit b71612cb2f
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774
4 changed files with 5 additions and 2 deletions

View file

@ -16,6 +16,7 @@ from .message.response import Response
from .procedure import procedure
from .runner import main
from .utils import run
from .__version__ import __version__
# Alias for platypush.event.hook.hook,
# see https://git.platypush.tech/platypush/platypush/issues/399
@ -23,7 +24,6 @@ when = hook
__author__ = 'Fabio Manganiello <fabio@manganiello.tech>'
__version__ = '1.1.3'
__all__ = [
'Application',
'Variable',
@ -41,6 +41,7 @@ __all__ = [
'procedure',
'run',
'when',
'__version__',
]

1
platypush/__version__.py Normal file
View file

@ -0,0 +1 @@
__version__ = '1.1.3'

View file

@ -12,6 +12,8 @@ data_files =
platypush/config/*.yaml
[metadata]
name = platypush
version = attr: platypush.__version__.__version__
description_file = README.md
[flake8]

View file

@ -66,7 +66,6 @@ backend = pkg_files('platypush/backend')
setup(
name="platypush",
version="1.1.3",
author="Fabio Manganiello",
author_email="fabio@manganiello.tech",
description="Platypush service",