From fd025fc219f6a81e3e8b0b6c6e6d7e7e65e7324e Mon Sep 17 00:00:00 2001 From: Yngve Levinsen <yngve.levinsen@esss.se> Date: Tue, 28 Aug 2018 16:30:42 +0200 Subject: [PATCH] a cleaner way to define version --- doc/conf.py | 5 +++-- ess/__init__.py | 1 + setup.py | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index fd8aaf9..4702002 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -19,6 +19,7 @@ # import os import sys +from ess import __version__ sys.path.insert(0, os.path.abspath('../')) # -- General configuration ------------------------------------------------ @@ -67,9 +68,9 @@ author = 'Ryoichi Miyamoto, Yngve Levinsen, Mamad Eshraqi' # built documents. # # The short X.Y version. -version = '2' +version = __version__ # The full version, including alpha/beta/rc tags. -release = '2.2' +release = version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/ess/__init__.py b/ess/__init__.py index a6d9497..ab19743 100644 --- a/ess/__init__.py +++ b/ess/__init__.py @@ -1,4 +1,5 @@ __all__ = ["fieldmap", "installed", "lib_tw", "SP_Relativity", "TraceWin" "TTF"] +__version__ = '2.2' from . import TraceWin from . import installed from . import lib_tw diff --git a/setup.py b/setup.py index 35aa685..f2cbcb3 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,8 @@ from distutils.core import setup +from ess import __version__ setup(name='ESS Python Tools', - version='2.2', + version=__version__, description='ESS Related Tools for Python', url='http://ess-bp.pages.esss.lu.se/ess-python-tools', author='Yngve Levinsen', -- GitLab