Skip to content

Commit

Permalink
Merge pull request #49 from hegdevinayi/hotfix/version
Browse files Browse the repository at this point in the history
Single source the package version
  • Loading branch information
tachyontraveler authored Sep 17, 2019
2 parents d06ab69 + ba2d283 commit 1c795ae
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions qmpy/VERSION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.2.0
7 changes: 6 additions & 1 deletion qmpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@

import django.core.exceptions as de

__version__ = 'qmpy version = 1.3'

with open(os.path.join(os.path.dirname(__file__), 'VERSION.txt')) as fr:
__version__ = fr.read().strip()
VERSION = __version__
__short_version__ = __version__.rpartition('.')[0]


INSTALL_PATH = os.path.abspath(os.path.dirname(__file__))
sys.path = [os.path.join(INSTALL_PATH, 'qmpy', 'db')] + sys.path
Expand Down
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import os
from setuptools import setup, find_packages

with open(os.path.join(os.path.dirname(__file__), 'qmpy', 'VERSION.txt')) as fr:
version = fr.read().strip()

setup(
name='qmpy',
version='1.2.0',
version=version,
author='S. Kirklin',
author_email='[email protected]',
license='LICENSE.txt',
Expand Down

0 comments on commit 1c795ae

Please sign in to comment.