From 0516970935575c4d829276319a5856b21ecad60e Mon Sep 17 00:00:00 2001 From: Ethan Paul Date: Tue, 18 Feb 2020 22:58:33 -0500 Subject: [PATCH] Update about module to pull from pyproject --- keyosk/__about__.py | 20 ++++++++++++-------- keyosk/pyproject.toml | 1 + 2 files changed, 13 insertions(+), 8 deletions(-) create mode 120000 keyosk/pyproject.toml diff --git a/keyosk/__about__.py b/keyosk/__about__.py index cdbf289..e5a233e 100644 --- a/keyosk/__about__.py +++ b/keyosk/__about__.py @@ -1,8 +1,12 @@ -# pylint: disable=missing-docstring -__title__ = "front-desk" -__version__ = "0.1.0" -__summary__ = "Web application for managing JSON Web Tokens" -__author__ = "Ethan Paul" -__author_email__ = "e@enp.one" -__url__ = "http://github.com/enpaul/front-desk" -__license__ = "MIT" +"""Access package info programatically without duplication""" +import importlib.resources + +import toml + +PYPROJECT = toml.loads(importlib.resources.read_text("keyosk", "pyproject.toml")) + +__authors__ = PYPROJECT["tool"]["poetry"]["authors"] +__summary__ = PYPROJECT["tool"]["poetry"]["description"] +__title__ = PYPROJECT["tool"]["poetry"]["name"] +__url__ = PYPROJECT["tool"]["poetry"]["repository"] +__version__ = PYPROJECT["tool"]["poetry"]["version"] diff --git a/keyosk/pyproject.toml b/keyosk/pyproject.toml new file mode 120000 index 0000000..1e11d78 --- /dev/null +++ b/keyosk/pyproject.toml @@ -0,0 +1 @@ +../pyproject.toml \ No newline at end of file