diff --git a/hyperop/__init__.py b/hyperop/__init__.py index 6513d28..92def4c 100644 --- a/hyperop/__init__.py +++ b/hyperop/__init__.py @@ -1,3 +1,4 @@ +from ._version import __version__ from .hyperop import hyperop, bounded_hyperop -__all__ = ['hyperop', 'bounded_hyperop'] +__all__ = ['hyperop', 'bounded_hyperop', '__version__'] diff --git a/hyperop/_version.py b/hyperop/_version.py new file mode 100644 index 0000000..f901408 --- /dev/null +++ b/hyperop/_version.py @@ -0,0 +1 @@ +__version__ = "1.1" diff --git a/setup.py b/setup.py index 283b1dc..b9550d0 100644 --- a/setup.py +++ b/setup.py @@ -1,17 +1,19 @@ -import os from setuptools import setup +# Load the version string +exec(open('hyperop/_version.py').read()) + setup( name="hyperop", packages=['hyperop'], - version="1.0", - download_url = 'https://github.com/thoppe/python-hyperoperators/tarball/1.0', + version=__version__, + download_url='https://github.com/thoppe/python-hyperoperators/tarball/1.0', author="Travis Hoppe", author_email="travis.hoppe+hyperop@gmail.com", description=( "Hyperoperators (succession, addition, multiplication, exponentiation, tetration and higher) in python."), license = "Creative Commons Attribution-ShareAlike 4.0 International License", - keywords = ["math","hyperoperators","uparrow","large-numbers",], + keywords = ["math", "hyperoperators", "uparrow", "large-numbers", ], url="https://github.com/thoppe/python-hyperoperators", test_suite="tests", ) diff --git a/tests/hyperop_test.py b/tests/hyperop_test.py index 9b16be5..f68a808 100644 --- a/tests/hyperop_test.py +++ b/tests/hyperop_test.py @@ -2,6 +2,7 @@ import itertools import math import operator +import hyperop as hyperop_lib from hyperop import hyperop, bounded_hyperop testing_values = range(1, 15) @@ -159,5 +160,11 @@ def test_special_case_a0(self): for n in range(4, 15): assert H[n](0, b) == (b % 2 == 0) + +class CheckMeta(unittest.TestCase): + + def test_VersionNumberExists(self): + hyperop_lib.__version__ + if __name__ == '__main__': unittest.main()