Skip to content

Commit 95fc833

Browse files
committed
Fix version number to enable __version__
1 parent 5b1c83f commit 95fc833

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

setup.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1+
import os
12
from setuptools import find_packages, setup
23

3-
from tap import __version__
4+
# Load version number
5+
__version__ = None
46

7+
src_dir = os.path.abspath(os.path.dirname(__file__))
8+
version_file = os.path.join(src_dir, 'tap', '_version.py')
59

10+
with open(version_file) as fd:
11+
exec(fd.read())
12+
13+
# Load README
614
with open('README.md', encoding='utf-8') as f:
715
long_description = f.read()
816

tap/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1+
from tap._version import __version__
12
from tap.tap import Tap
23

3-
__version__ = '1.5.0'
44
__all__ = ['Tap', '__version__']

tap/_version.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
__all__ = ['__version__']
2+
3+
# major, minor, patch
4+
version_info = 1, 5, 1
5+
6+
# Nice string for the version
7+
__version__ = '.'.join(map(str, version_info))

0 commit comments

Comments
 (0)