diff --git a/GPy/VERSION b/GPy/VERSION deleted file mode 100644 index a3df0a69..00000000 --- a/GPy/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.8.0 diff --git a/GPy/__init__.py b/GPy/__init__.py index 88e73d8c..5f2a209f 100644 --- a/GPy/__init__.py +++ b/GPy/__init__.py @@ -21,8 +21,7 @@ from . import plotting from .core import Model from .core.parameterization import Param, Parameterized, ObsAr -with open('VERSION', 'r') as f: - __version__ = f.read() +from .__version__ import __version__ #@nottest try: diff --git a/setup.cfg b/setup.cfg index e08cd251..5c2a81c0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,4 +3,4 @@ current_version = 0.8.0 tag = True commit = True -[bumpversion:file:GPy/VERSION] +[bumpversion:file:GPy/__version__.py] diff --git a/setup.py b/setup.py index 49144a69..60d58ad8 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,10 @@ import numpy as np def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() -__version__ = read('GPy/VERSION') +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 @@ -72,7 +75,7 @@ setup(name = 'GPy', package_data = {'GPy': ['defaults.cfg', 'installation.cfg', 'util/data_resources.json', 'util/football_teams.json', - 'VERSION']}, + ]}, include_package_data = True, py_modules = ['GPy.__init__'], test_suite = 'GPy.testing',