From 75fa82596287126cd4d18c09f40ef1dcaf82e4ba Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Thu, 23 Dec 2021 03:24:12 +0100 Subject: [PATCH] fix(backend): Provide version, fix metadata --- backend/flaschengeist_events/__init__.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/backend/flaschengeist_events/__init__.py b/backend/flaschengeist_events/__init__.py index c32e388..ff707d2 100644 --- a/backend/flaschengeist_events/__init__.py +++ b/backend/flaschengeist_events/__init__.py @@ -2,6 +2,7 @@ Provides duty schedule / duty roster functions """ +import pkg_resources from flask import Blueprint, current_app from werkzeug.local import LocalProxy @@ -9,12 +10,15 @@ from flaschengeist.plugins import Plugin from . import permissions, models +__version__ = pkg_resources.get_distribution("flaschengeist_events").version + + class EventPlugin(Plugin): - name = "events" - id = "dev.flaschengeist.plugins.events" - plugin = LocalProxy(lambda: current_app.config["FG_PLUGINS"][EventPlugin.name]) + id = "dev.flaschengeist.events" + plugin = LocalProxy(lambda: current_app.config["FG_PLUGINS"][EventPlugin.id]) + # provided resources permissions = permissions.permissions - blueprint = Blueprint(name, __name__) + blueprint = Blueprint("events", __name__) models = models def __init__(self, cfg):