diff --git a/GPy/__init__.py b/GPy/__init__.py index 34baf7d7..5f2a209f 100644 --- a/GPy/__init__.py +++ b/GPy/__init__.py @@ -21,7 +21,7 @@ from . import plotting from .core import Model from .core.parameterization import Param, Parameterized, ObsAr -__version__ = '0.8.0' +from .__version__ import __version__ #@nottest try: diff --git a/GPy/__version__.py b/GPy/__version__.py new file mode 100644 index 00000000..777f190d --- /dev/null +++ b/GPy/__version__.py @@ -0,0 +1 @@ +__version__ = "0.8.0" diff --git a/setup.cfg b/setup.cfg index 73d18f56..5c2a81c0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,5 +3,4 @@ current_version = 0.8.0 tag = True commit = True -[bumpversion:file:setup.py] -[bumpversion:file:GPy/__init__.py] +[bumpversion:file:GPy/__version__.py] diff --git a/setup.py b/setup.py index d25dc242..60d58ad8 100644 --- a/setup.py +++ b/setup.py @@ -6,12 +6,14 @@ import sys from setuptools import setup, Extension import numpy as np -# Version number -__version__ = '0.8.0' - def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() +version_dummy = {} +exec(read('GPy/__version__.py'), version_dummy) +__version__ = version_dummy['__version__'] +del version_dummy + #Mac OS X Clang doesn't support OpenMP th the current time. #This detects if we are building on a Mac def ismac(): @@ -72,7 +74,8 @@ setup(name = 'GPy', package_dir={'GPy': 'GPy'}, package_data = {'GPy': ['defaults.cfg', 'installation.cfg', 'util/data_resources.json', - 'util/football_teams.json']}, + 'util/football_teams.json', + ]}, include_package_data = True, py_modules = ['GPy.__init__'], test_suite = 'GPy.testing',