diff --git a/gridlock/VERSION b/gridlock/VERSION deleted file mode 100644 index bd73f47..0000000 --- a/gridlock/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.4 diff --git a/gridlock/VERSION.py b/gridlock/VERSION.py new file mode 100644 index 0000000..a3aacc8 --- /dev/null +++ b/gridlock/VERSION.py @@ -0,0 +1,4 @@ +""" VERSION defintion. THIS FILE IS MANUALLY PARSED BY setup.py and REQUIRES A SPECIFIC FORMAT """ +__version__ = ''' +0.4 +''' diff --git a/gridlock/__init__.py b/gridlock/__init__.py index 5d681da..171b4cc 100644 --- a/gridlock/__init__.py +++ b/gridlock/__init__.py @@ -15,15 +15,11 @@ Dependencies: - mpl_toolkits.mplot3d [Grid.visualize_isosurface()] - skimage [Grid.visualize_isosurface()] """ - -import pathlib - from .error import GridError from .direction import Direction from .grid import Grid __author__ = 'Jan Petykiewicz' -with open(pathlib.Path(__file__).parent / 'VERSION', 'r') as f: - __version__ = f.read().strip() +from .VERSION import __version__ version = __version__ diff --git a/setup.py b/setup.py index 6f89c44..914d6f5 100644 --- a/setup.py +++ b/setup.py @@ -5,8 +5,8 @@ from setuptools import setup, find_packages with open('README.md', 'r') as f: long_description = f.read() -with open('gridlock/VERSION', 'r') as f: - version = f.read().strip() +with open('gridlock/VERSION.py', 'rt') as f: + version = f.readlines()[2].strip() setup(name='gridlock', version=version, @@ -18,7 +18,7 @@ setup(name='gridlock', url='https://mpxd.net/code/jan/gridlock', packages=find_packages(), package_data={ - 'gridlock': ['VERSION'] + 'gridlock': [], }, install_requires=[ 'numpy',