diff --git a/civil_contracting/__init__.py b/civil_contracting/__init__.py index e69de29..2b8d5e7 100644 --- a/civil_contracting/__init__.py +++ b/civil_contracting/__init__.py @@ -0,0 +1,3 @@ +from __future__ import unicode_literals + +__version__ = '1.5.0' diff --git a/civil_contracting/__version__.py b/civil_contracting/__version__.py deleted file mode 100644 index db93900..0000000 --- a/civil_contracting/__version__.py +++ /dev/null @@ -1,2 +0,0 @@ -from __future__ import unicode_literals -__version__ = "1.4.0" diff --git a/civil_contracting/hooks.py b/civil_contracting/hooks.py index 9af4b8b..ff23ac6 100644 --- a/civil_contracting/hooks.py +++ b/civil_contracting/hooks.py @@ -1,3 +1,5 @@ +from . import __version__ as app_version + app_name = "civil_contracting" app_title = "Civil Contracting" app_publisher = "Revant Nandgaonkar" @@ -5,7 +7,6 @@ app_icon = "octicon octicon-zap" app_color = "grey" app_email = "revant.one@gmail.com" -app_version = "1.4.0" app_license = "GPL v2" # Includes in diff --git a/setup.py b/setup.py index 9ea300a..5a3a9cd 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,13 @@ from setuptools import setup, find_packages import os -version = '1.4.0' +import re, ast + +# get version from __version__ variable in app's/__init__.py +_version_re = re.compile(r'__version__\s+=\s+(.*)') +with open('civil_contracting/__init__.py', 'rb') as f: + version = str(ast.literal_eval(_version_re.search( + f.read().decode('utf-8')).group(1))) setup( name='civil_contracting',