diff --git a/qmpy/VERSION.txt b/qmpy/VERSION.txt new file mode 100644 index 00000000..26aaba0e --- /dev/null +++ b/qmpy/VERSION.txt @@ -0,0 +1 @@ +1.2.0 diff --git a/qmpy/__init__.py b/qmpy/__init__.py index 15d4f96e..f272a984 100644 --- a/qmpy/__init__.py +++ b/qmpy/__init__.py @@ -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 diff --git a/setup.py b/setup.py index e015809f..072dc1c2 100644 --- a/setup.py +++ b/setup.py @@ -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='scott.kirklin@gmail.com', license='LICENSE.txt',