From 423cd36feddb21322d8f6ca77e7b64100141a422 Mon Sep 17 00:00:00 2001 From: JayPiKay Date: Sun, 1 Sep 2019 19:09:18 +0200 Subject: [PATCH] Added version to setup and sbeam --- setup.py | 9 +++++++-- src/sbeam.py | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index a4af114..980f73c 100755 --- a/setup.py +++ b/setup.py @@ -1,10 +1,15 @@ from setuptools import setup, find_namespace_packages +from distutils.util import convert_path +main_ns = {} +ver_path = convert_path('src/sbeam.py') +with open(ver_path) as ver_file: + exec(ver_file.read(), main_ns) setup( name="sbeam", - description="", - version="0.3", + description="SuperBeam CLI Client", + version=main_ns['__VERSION__'], author="JayPiKay", author_email="jpk+python@goatpr0n.de", url='https://git.goatpr0n.de/', diff --git a/src/sbeam.py b/src/sbeam.py index 2fc3c08..c2d579c 100755 --- a/src/sbeam.py +++ b/src/sbeam.py @@ -31,7 +31,11 @@ import requests import SuperBeam +__VERSION__ = '0.4' + + @click.group() +@click.version_option(version=__VERSION__, prog_name='SuperBeam CLI') def cli(): pass