-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from claws/add_czmq_version_checking
Add CZMQ version check to installer
- Loading branch information
Showing
3 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
from . import ( | ||
zmq, | ||
zsys, | ||
zctx, | ||
zsocket, | ||
zstr, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from pyczmq._cffi import C, ffi, cdef | ||
|
||
__doc__ = """ | ||
The zsys class provides miscellaneous functions. Only a limited set of | ||
functions are exposed from the czmq zsys module as many duplicate | ||
functionality of built-in python types or libraries. | ||
""" | ||
|
||
@cdef('void zsys_version (int *major, int *minor, int *patch);') | ||
def zsys_version(): | ||
""" | ||
Returns the tuple (major, minor, patch) of the current czmq version. | ||
""" | ||
major = ffi.new('int*') | ||
minor= ffi.new('int*') | ||
patch = ffi.new('int*') | ||
C.zsys_version(major, minor, patch) | ||
return (major[0], minor[0], patch[0]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters