diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-10-14 11:44:06 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-10-14 11:49:32 +0300 |
commit | 83a64137c06e0eb1bbc1933c10136fffd57ccd9f (patch) | |
tree | e5aa4649a4ef52ccfc0bc7d3e6cf122deb864652 /ick2 | |
parent | d485239e28d5b1e8f06898836cb36f7fcc1ee723 (diff) | |
download | ick2-83a64137c06e0eb1bbc1933c10136fffd57ccd9f.tar.gz |
Refactor: move ick2version/version.py into ick2
Diffstat (limited to 'ick2')
-rw-r--r-- | ick2/__init__.py | 1 | ||||
-rw-r--r-- | ick2/controllerapi.py | 3 | ||||
-rw-r--r-- | ick2/controllerapi_tests.py | 3 | ||||
-rw-r--r-- | ick2/version.py | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/ick2/__init__.py b/ick2/__init__.py index 244ca88..e24092e 100644 --- a/ick2/__init__.py +++ b/ick2/__init__.py @@ -13,6 +13,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. +from .version import __version__, __version_info__ from .logging import setup_logging, log from .state import ControllerState, NotFound from .controllerapi import ControllerAPI diff --git a/ick2/controllerapi.py b/ick2/controllerapi.py index ef93f54..7d43fda 100644 --- a/ick2/controllerapi.py +++ b/ick2/controllerapi.py @@ -17,7 +17,6 @@ import apifw import ick2 -import ick2version class ControllerAPI: @@ -72,7 +71,7 @@ class ControllerAPI: return apifw.Response({ 'status': apifw.HTTP_OK, 'body': { - 'version': ick2version.__version__, + 'version': ick2.__version__, }, 'headers': { 'Content-Type': 'application/json', diff --git a/ick2/controllerapi_tests.py b/ick2/controllerapi_tests.py index 8a914a3..f8f6941 100644 --- a/ick2/controllerapi_tests.py +++ b/ick2/controllerapi_tests.py @@ -20,7 +20,6 @@ import unittest import ick2 -import ick2version class ControllerAPITests(unittest.TestCase): @@ -54,7 +53,7 @@ class ControllerAPITests(unittest.TestCase): self.assertEqual( response['body'], { - 'version': ick2version.__version__, + 'version': ick2.__version__, } ) diff --git a/ick2/version.py b/ick2/version.py new file mode 100644 index 0000000..ed54455 --- /dev/null +++ b/ick2/version.py @@ -0,0 +1,2 @@ +__version__ = "0.6+git" +__version_info__ = (0, 6, '+git') |