mirror of https://github.com/tqdm/tqdm.git
Read version number from tqdm/_version.py
This commit is contained in:
parent
9e37070c73
commit
45c791954e
9
setup.py
9
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__,
|
||||
|
|
|
@ -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('-')
|
||||
|
|
Loading…
Reference in New Issue