Skip to content

Commit c265183

Browse files
committed
Merge pull request #7 from thoppe/develop/auto_version
Develop/auto version
2 parents 2c70d14 + e299b7e commit c265183

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

hyperop/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from ._version import __version__
12
from .hyperop import hyperop, bounded_hyperop
23

3-
__all__ = ['hyperop', 'bounded_hyperop']
4+
__all__ = ['hyperop', 'bounded_hyperop', '__version__']

hyperop/_version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "1.1"

setup.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
import os
21
from setuptools import setup
32

3+
# Load the version string
4+
exec(open('hyperop/_version.py').read())
5+
46
setup(
57
name="hyperop",
68
packages=['hyperop'],
7-
version="1.0",
8-
download_url = 'https://github.com/thoppe/python-hyperoperators/tarball/1.0',
9+
version=__version__,
10+
download_url='https://github.com/thoppe/python-hyperoperators/tarball/1.0',
911
author="Travis Hoppe",
1012
author_email="[email protected]",
1113
description=(
1214
"Hyperoperators (succession, addition, multiplication, exponentiation, tetration and higher) in python."),
1315
license = "Creative Commons Attribution-ShareAlike 4.0 International License",
14-
keywords = ["math","hyperoperators","uparrow","large-numbers",],
16+
keywords = ["math", "hyperoperators", "uparrow", "large-numbers", ],
1517
url="https://github.com/thoppe/python-hyperoperators",
1618
test_suite="tests",
1719
)

tests/hyperop_test.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import itertools
33
import math
44
import operator
5+
import hyperop as hyperop_lib
56
from hyperop import hyperop, bounded_hyperop
67

78
testing_values = range(1, 15)
@@ -159,5 +160,11 @@ def test_special_case_a0(self):
159160
for n in range(4, 15):
160161
assert H[n](0, b) == (b % 2 == 0)
161162

163+
164+
class CheckMeta(unittest.TestCase):
165+
166+
def test_VersionNumberExists(self):
167+
hyperop_lib.__version__
168+
162169
if __name__ == '__main__':
163170
unittest.main()

0 commit comments

Comments
 (0)