diff --git a/setup.py b/setup.py index a4dec66..1295471 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,8 @@ from setuptools import setup, Extension -version = '20190115.3' +version = {} +with open('triangle/version.py') as f: + exec(f.read(), version) define_macros = [ ('VOID', 'void'), @@ -22,7 +24,7 @@ setup( name='triangle', - version=version, + version=version['__version__'], description='Python binding to the triangle library', author='Dzhelil Rufat', author_email='d@rufat.be', diff --git a/triangle/__init__.py b/triangle/__init__.py index 227bd59..7255954 100644 --- a/triangle/__init__.py +++ b/triangle/__init__.py @@ -1,5 +1,6 @@ -__version__ = '20190115.3' - +from triangle.version import ( + __version__, +) from triangle.data import ( loads, load, get_data, show_data, ) diff --git a/triangle/version.py b/triangle/version.py new file mode 100644 index 0000000..1f11b91 --- /dev/null +++ b/triangle/version.py @@ -0,0 +1 @@ +__version__ = '20190115.3'