diff --git a/src/gnucash_web/__init__.py b/src/gnucash_web/__init__.py index a2c39cd..e19ea32 100644 --- a/src/gnucash_web/__init__.py +++ b/src/gnucash_web/__init__.py @@ -6,7 +6,7 @@ from flask.cli import FlaskGroup import click -from . import auth, book, commodities, __version__ +from . import auth, book, commodities from .utils import jinja as jinja_utils from .config import GnuCashWebConfig @@ -56,7 +56,8 @@ def create_app(test_config=None): app.jinja_env.filters['nth'] = jinja_utils.nth app.jinja_env.globals['is_authenticated'] = auth.is_authenticated - app.jinja_env.globals['pkg_version'] = __version__.VERSION + with open('gnucash_web/version.txt') as version: + app.jinja_env.globals['pkg_version'] = version.read().strip() app.register_blueprint(auth.bp) app.register_blueprint(book.bp) diff --git a/src/gnucash_web/__version__.py b/src/gnucash_web/__version__.py deleted file mode 100644 index 1f6518e..0000000 --- a/src/gnucash_web/__version__.py +++ /dev/null @@ -1 +0,0 @@ -VERSION = '0.1.0' diff --git a/src/gnucash_web/version.txt b/src/gnucash_web/version.txt new file mode 100644 index 0000000..6e8bf73 --- /dev/null +++ b/src/gnucash_web/version.txt @@ -0,0 +1 @@ +0.1.0 diff --git a/src/setup.py b/src/setup.py index dac2036..a2f5dbf 100755 --- a/src/setup.py +++ b/src/setup.py @@ -1,13 +1,14 @@ #!python from setuptools import setup, find_packages from os.path import exists -from gnucash_web import __version__ +import pathlib readme = open('README.md') if exists('README.md') else open('../README.md') +version = open('gnucash_web/version.txt') setup( name='GnuCash Web', - version=__version__.VERSION, + version=version.read().strip(), author='Joshua Bachmeier', author_email='joshua@bachmeier.cc', description='A simple, easy to use, mobile-friendly webinterface for GnuCash intended for self-hosting',