From 9cd2dd131b2e2501a40a47df2011ca893029e20f Mon Sep 17 00:00:00 2001 From: jan Date: Thu, 12 Sep 2019 12:21:09 +0200 Subject: [PATCH] Move version into setup.py and read it back with pkg_resources --- meanas/__init__.py | 4 +++- setup.py | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/meanas/__init__.py b/meanas/__init__.py index d4288a5..131646b 100644 --- a/meanas/__init__.py +++ b/meanas/__init__.py @@ -41,8 +41,10 @@ Dependencies: """ +import pkg_resources + from .types import dx_lists_t, field_t, vfield_t, field_updater from .vectorization import vec, unvec __author__ = 'Jan Petykiewicz' -version = '0.5' +__version__ = pkg_resources.get_distribution('meanas').version diff --git a/setup.py b/setup.py index 8e817cb..7093b57 100644 --- a/setup.py +++ b/setup.py @@ -1,13 +1,12 @@ #!/usr/bin/env python3 from setuptools import setup, find_packages -import meanas with open('README.md', 'r') as f: long_description = f.read() setup(name='meanas', - version=meanas.version, + version='0.5', description='Electromagnetic simulation tools', long_description=long_description, long_description_content_type='text/markdown',