Skip to content

Commit

Permalink
Move version info to its own module
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisjared committed Mar 7, 2018
1 parent b96921b commit 3911c62
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

from setuptools import setup, find_packages

from wrfconf import __version__
version = None
exec(open('wrfconf/version.py').read())

with open(path.join(path.abspath(path.dirname(__file__)), 'README.rst')) as f:
long_description = f.read()

setup(name='wrfconf',
version=__version__,
version=version,
description='Configuration generator for WRF namelists',
long_description=long_description,
author='Jared Lewis',
Expand Down
5 changes: 3 additions & 2 deletions wrfconf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
__version__ = "0.5.1"
from wrfconf import version
from .process import create_wps_namelist, create_wrf_namelist, process_conf_file, ordered_load

from .process import create_wps_namelist, create_wrf_namelist, process_conf_file, ordered_load
__version__ = version
2 changes: 2 additions & 0 deletions wrfconf/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version = "0.5.1"
version_info = tuple([int(d) for d in version.split("-")[0].split(".")])

0 comments on commit 3911c62

Please sign in to comment.