Move to VERSION.py approach for version

This commit is contained in:
Jan Petykiewicz 2021-07-11 17:04:18 -07:00
parent 8afe1d1f26
commit 45e047c50e
3 changed files with 10 additions and 3 deletions

4
opencl_fdtd/VERSION.py Normal file
View File

@ -0,0 +1,4 @@
""" VERSION defintion. THIS FILE IS MANUALLY PARSED BY setup.py and REQUIRES A SPECIFIC FORMAT """
__version__ = '''
0.4
'''.strip()

View File

@ -2,4 +2,5 @@ from .simulation import Simulation, type_to_C
__author__ = 'Jan Petykiewicz'
version = '0.4'
from .VERSION import __version__
version = __version__

View File

@ -1,13 +1,15 @@
#!/usr/bin/env python3
from setuptools import setup, find_packages
import opencl_fdtd
with open('README.md', 'r') as f:
long_description = f.read()
with open('opencl_fdtd/VERSION.py', 'rt') as f:
version = f.readlines()[2].strip()
setup(name='opencl_fdtd',
version=opencl_fdtd.version,
version=version,
description='OpenCL FDTD solver',
long_description=long_description,
long_description_content_type='text/markdown',