Skip to content

Commit

Permalink
Put version in ais.__version__ variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Wurster committed Oct 27, 2015
1 parent 6b7e1f5 commit 4ebe26f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

4 changes: 4 additions & 0 deletions ais/__init__.py
Expand Up @@ -2,3 +2,7 @@

from _ais import decode
from _ais import DecodeError


__license__ = 'Apache 2.0'
__version__ = '0.16'
7 changes: 5 additions & 2 deletions setup.py
Expand Up @@ -5,8 +5,11 @@

from setuptools import setup, find_packages, Extension

with open('VERSION') as f:
VERSION = f.readline().strip()
VERSION = None
with open(os.path.join('ais', '__init__.py')) as f:
for line in f:
if line.strip().startswith('__version__'):
VERSION = line.split('=')[1].strip().replace('"', '').replace("'", '').strip()

EXTRA_COMPILE_ARGS = []
if sys.platform in ('darwin', 'linux', 'linux2'):
Expand Down

0 comments on commit 4ebe26f

Please sign in to comment.