1{ lib
2, buildPythonPackage
3, fetchPypi
4, py
5, pytestCheckHook
6, python
7, pythonOlder
8, tornado
9, zeromq
10}:
11
12buildPythonPackage rec {
13 pname = "pyzmq";
14 version = "23.2.1";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.6";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-KzgaqGfs59CoLzCgx/PUOHt88uBpfjPvqlvtbFeEq80=";
22 };
23
24 buildInputs = [
25 zeromq
26 ];
27
28 propagatedBuildInputs = [
29 py
30 ];
31
32 checkInputs = [
33 pytestCheckHook
34 tornado
35 ];
36
37 pythonImportsCheck = [
38 "zmq"
39 ];
40
41 pytestFlagsArray = [
42 "$out/${python.sitePackages}/zmq/tests/" # Folder with tests
43 ];
44
45 disabledTests = [
46 # Tests hang
47 "test_socket"
48 "test_monitor"
49 # https://github.com/zeromq/pyzmq/issues/1272
50 "test_cython"
51 # Test fails
52 "test_mockable"
53 # Issues with the sandbox
54 "TestFutureSocket"
55 "TestIOLoop"
56 "TestPubLog"
57 ];
58
59 # Some of the tests use localhost networking.
60 __darwinAllowLocalNetworking = true;
61
62 meta = with lib; {
63 description = "Python bindings for ØMQ";
64 homepage = "https://pyzmq.readthedocs.io/";
65 license = with licenses; [ bsd3 /* or */ lgpl3Only ];
66 maintainers = with maintainers; [ ];
67 };
68}