From 35725e6373c4052eda3650f5f712073a00a9033e Mon Sep 17 00:00:00 2001 From: Karl Kosack Date: Tue, 9 May 2017 16:09:34 +0200 Subject: [PATCH] added __version__ attribute --- ctapipe_resources/VERSION.py | 1 + ctapipe_resources/__init__.py | 1 + setup.py | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 ctapipe_resources/VERSION.py diff --git a/ctapipe_resources/VERSION.py b/ctapipe_resources/VERSION.py new file mode 100644 index 0000000..020ed73 --- /dev/null +++ b/ctapipe_resources/VERSION.py @@ -0,0 +1 @@ +__version__ = '0.2.2' diff --git a/ctapipe_resources/__init__.py b/ctapipe_resources/__init__.py index 78a908a..4aecd2e 100644 --- a/ctapipe_resources/__init__.py +++ b/ctapipe_resources/__init__.py @@ -1,4 +1,5 @@ import pkg_resources +from .VERSION import __version__ __all__ = ['resource_filename', 'gamma_test_file'] diff --git a/setup.py b/setup.py index eec0dda..00190a2 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,12 @@ from setuptools import setup, find_packages +version = {} +with open("./ctapipe_resources/VERSION.py") as fp: + exec(fp.read(), version) setup( name='ctapipe-extra', - version='0.2.1', + version=version['__version__'], packages=find_packages(), package_data={'ctapipe_resources': '*'}, )