diff --git a/setup.py b/setup.py index f389a9a8..efe7409c 100755 --- a/setup.py +++ b/setup.py @@ -1,8 +1,15 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from tqdm._version import __version__ +import os from setuptools import setup +# Get version from tqdm/_version.py +__version__ = None +version_file = os.path.join(os.path.dirname(__file__), 'tqdm', '_version.py') +for line in open(version_file).readlines(): + if (line.startswith('version_info') or line.startswith('__version__')): + exec(line.strip()) + setup( name='tqdm', version=__version__, diff --git a/tqdm/_version.py b/tqdm/_version.py index 9d384d51..6e613598 100644 --- a/tqdm/_version.py +++ b/tqdm/_version.py @@ -1 +1,5 @@ -__version__ = '2.0-dev' +# Definition of the version number +version_info = 2, 0, 0, 'dev' # major, minor, patch, extra + +# Nice string for the version (mimic how IPython composes its version str) +__version__ = '-'.join(map(str, version_info)).replace('-', '.').strip('-')