Skip to content

Commit

Permalink
- Fix version number
Browse files Browse the repository at this point in the history
- Use importlib to get version number
  • Loading branch information
cybermaggedon committed Jul 31, 2024
1 parent e887f21 commit c28d0a2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

VERSION=1.7.1
VERSION=1.7.2

all:

Expand Down
2 changes: 1 addition & 1 deletion gnucash_uk_vat/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version="1.7.1"
version="1.7.2"
12 changes: 9 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@

import setuptools
import imp
import importlib

with open("README.md", "r") as fh:
long_description = fh.read()

version_module = imp.load_source('version', 'gnucash_uk_vat/version.py')

# Load a version number module?!
spec = importlib.util.spec_from_file_location(
'version', 'gnucash_uk_vat/version.py'
)
version_module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(version_module)

version = version_module.version

setuptools.setup(
Expand Down

0 comments on commit c28d0a2

Please sign in to comment.