Skip to content

Commit

Permalink
Up version
Browse files Browse the repository at this point in the history
  • Loading branch information
rbeucher committed Aug 18, 2020
1 parent 06f580a commit db7e7ad
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
3 changes: 3 additions & 0 deletions pyFTracks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@
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"
23 changes: 16 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
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"""
Expand All @@ -14,6 +10,19 @@ 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__))
Expand All @@ -33,9 +42,9 @@ def __str__(self):
'numpy',
'cython'
],
version=VERSION,
version=get_version("pyFTracks/__init__.py"),
description='Fission Track Modelling and Analysis with Python',
ext_modules=extensions,
ext_modules=get_version("pyFTracks/__init__.py"),
include_package_data=True,
include_dirs=[get_numpy_include()],
long_description=long_description,
Expand Down

0 comments on commit db7e7ad

Please sign in to comment.