Skip to content

Commit

Permalink
Fix lookup of own version
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuabach committed Oct 24, 2023
1 parent f71a9b1 commit fa6caa0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/gnucash_web/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion src/gnucash_web/__version__.py

This file was deleted.

1 change: 1 addition & 0 deletions src/gnucash_web/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0
5 changes: 3 additions & 2 deletions src/setup.py
Original file line number Diff line number Diff line change
@@ -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',
Expand Down

0 comments on commit fa6caa0

Please sign in to comment.