summaryrefslogtreecommitdiffstats
path: root/src/console/zmq/sugar/version.py
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2015-08-23 15:26:27 +0300
committerHanoh Haim <hhaim@cisco.com>2015-08-23 15:26:27 +0300
commit449198c97d2794b44b461093265637522b7a64b4 (patch)
tree36eb68c83b907474f507f5e8cde72856e29414bb /src/console/zmq/sugar/version.py
parentb156bb3ae7382481ed5f15e42d87cd3012870da5 (diff)
parent8384612b8493a4a896e91e3bb9d5d25689a87c12 (diff)
rpc integration
Diffstat (limited to 'src/console/zmq/sugar/version.py')
-rwxr-xr-xsrc/console/zmq/sugar/version.py48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/console/zmq/sugar/version.py b/src/console/zmq/sugar/version.py
new file mode 100755
index 00000000..ea8fbbc4
--- /dev/null
+++ b/src/console/zmq/sugar/version.py
@@ -0,0 +1,48 @@
+"""PyZMQ and 0MQ version functions."""
+
+# Copyright (C) PyZMQ Developers
+# Distributed under the terms of the Modified BSD License.
+
+
+from zmq.backend import zmq_version_info
+
+
+VERSION_MAJOR = 14
+VERSION_MINOR = 5
+VERSION_PATCH = 0
+VERSION_EXTRA = ""
+__version__ = '%i.%i.%i' % (VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH)
+
+if VERSION_EXTRA:
+ __version__ = "%s-%s" % (__version__, VERSION_EXTRA)
+ version_info = (VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH, float('inf'))
+else:
+ version_info = (VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH)
+
+__revision__ = ''
+
+def pyzmq_version():
+ """return the version of pyzmq as a string"""
+ if __revision__:
+ return '@'.join([__version__,__revision__[:6]])
+ else:
+ return __version__
+
+def pyzmq_version_info():
+ """return the pyzmq version as a tuple of at least three numbers
+
+ If pyzmq is a development version, `inf` will be appended after the third integer.
+ """
+ return version_info
+
+
+def zmq_version():
+ """return the version of libzmq as a string"""
+ return "%i.%i.%i" % zmq_version_info()
+
+
+__all__ = ['zmq_version', 'zmq_version_info',
+ 'pyzmq_version','pyzmq_version_info',
+ '__version__', '__revision__'
+]
+