at master 1.5 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 isPyPy, 6 7 # build-system 8 cffi, 9 cython, 10 cmake, 11 ninja, 12 packaging, 13 pathspec, 14 scikit-build-core, 15 16 # checks 17 pytestCheckHook, 18 pythonOlder, 19 tornado, 20 libsodium, 21 zeromq, 22 pytest-asyncio, 23}: 24 25buildPythonPackage rec { 26 pname = "pyzmq"; 27 version = "27.0.1"; 28 pyproject = true; 29 30 disabled = pythonOlder "3.6"; 31 32 src = fetchPypi { 33 inherit pname version; 34 hash = "sha256-RcVJIEvCDnSE/9JVX2zwLlckQOzy873WDUQEsg/d9ks="; 35 }; 36 37 build-system = [ 38 cmake 39 ninja 40 packaging 41 pathspec 42 scikit-build-core 43 ] 44 ++ (if isPyPy then [ cffi ] else [ cython ]); 45 46 dontUseCmakeConfigure = true; 47 48 buildInputs = [ 49 libsodium 50 zeromq 51 ]; 52 53 dependencies = lib.optionals isPyPy [ cffi ]; 54 55 nativeCheckInputs = [ 56 pytestCheckHook 57 tornado 58 pytest-asyncio 59 ]; 60 61 pythonImportsCheck = [ "zmq" ]; 62 63 preCheck = '' 64 rm -r zmq 65 ''; 66 67 disabledTestMarks = [ 68 "flaky" 69 ]; 70 71 disabledTests = [ 72 # Tests hang 73 "test_socket" 74 "test_monitor" 75 # https://github.com/zeromq/pyzmq/issues/1272 76 "test_cython" 77 # Test fails 78 "test_mockable" 79 # Issues with the sandbox 80 "TestFutureSocket" 81 "TestIOLoop" 82 "TestPubLog" 83 ]; 84 85 # Some of the tests use localhost networking. 86 __darwinAllowLocalNetworking = true; 87 88 meta = with lib; { 89 description = "Python bindings for ØMQ"; 90 homepage = "https://pyzmq.readthedocs.io/"; 91 license = with licenses; [ 92 bsd3 # or 93 lgpl3Only 94 ]; 95 maintainers = [ ]; 96 }; 97}