diff --git a/pyFTracks/__init__.py b/pyFTracks/__init__.py index 03a7295..5339dec 100644 --- a/pyFTracks/__init__.py +++ b/pyFTracks/__init__.py @@ -6,6 +6,3 @@ from .age_calculations import calculate_ages as single_grain_ages from .age_calculations import chi_square as chi2_test from .thermal_history import ThermalHistory - - -__version__= "0.2.9" diff --git a/setup.py b/setup.py index 9f1bee6..c6a10cf 100755 --- a/setup.py +++ b/setup.py @@ -1,7 +1,11 @@ from setuptools import setup, Extension from os import path -import codecs +MAJOR = 0 +MINOR = 2 +MICRO = 8 +ISRELEASED = False +VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO) class get_numpy_include(object): """Returns Numpy's include path with lazy import""" @@ -10,19 +14,6 @@ def __str__(self): import numpy return numpy.get_include() -def read(rel_path): - here = path.abspath(path.dirname(__file__)) - with codecs.open(path.join(here, rel_path), 'r') as fp: - return fp.read() - -def get_version(rel_path): - for line in read(rel_path).splitlines(): - if line.startswith('__version__'): - delim = '"' if '"' in line else "'" - return line.split(delim)[1] - else: - raise RuntimeError("Unable to find version string.") - # Get the long description from the README file here = path.abspath(path.dirname(__file__)) @@ -42,9 +33,9 @@ def get_version(rel_path): 'numpy', 'cython' ], - version=get_version("pyFTracks/__init__.py"), + version=VERSION, description='Fission Track Modelling and Analysis with Python', - ext_modules=get_version("pyFTracks/__init__.py"), + ext_modules=extensions, include_package_data=True, include_dirs=[get_numpy_include()], long_description=long_description,