Switch to file-based version number

This commit is contained in:
Jan Petykiewicz 2019-09-27 20:44:31 -07:00
parent 487bdd61ec
commit 0ad289e5ac
4 changed files with 15 additions and 3 deletions

3
MANIFEST.in Normal file
View File

@ -0,0 +1,3 @@
include README.md
include LICENSE.md
include meanas/VERSION

1
meanas/VERSION Normal file
View File

@ -0,0 +1 @@
0.5

View File

@ -41,10 +41,12 @@ Dependencies:
"""
import pkg_resources
import pathlib
from .types import dx_lists_t, field_t, vfield_t, field_updater
from .vectorization import vec, unvec
__author__ = 'Jan Petykiewicz'
__version__ = pkg_resources.get_distribution('meanas').version
with open(pathlib.Path(__file__).parent / 'VERSION', 'r') as f:
__version__ = f.read().strip()

View File

@ -5,8 +5,11 @@ from setuptools import setup, find_packages
with open('README.md', 'r') as f:
long_description = f.read()
with open('meanas/VERSION', 'r') as f:
version = f.read().strip()
setup(name='meanas',
version='0.5',
version=version,
description='Electromagnetic simulation tools',
long_description=long_description,
long_description_content_type='text/markdown',
@ -14,6 +17,9 @@ setup(name='meanas',
author_email='anewusername@gmail.com',
url='https://mpxd.net/code/jan/fdfd_tools',
packages=find_packages(),
package_data={
'meanas': ['VERSION']
},
install_requires=[
'numpy',
'scipy',