at 25.11-pre 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 = "26.3.0"; 28 pyproject = true; 29 30 disabled = pythonOlder "3.6"; 31 32 src = fetchPypi { 33 inherit pname version; 34 hash = "sha256-8c1ouCNvqreBOKj8cD98oK1DGxej/KxpY1hgDU5iQ7M="; 35 }; 36 37 build-system = [ 38 cmake 39 ninja 40 packaging 41 pathspec 42 scikit-build-core 43 ] ++ (if isPyPy then [ cffi ] else [ cython ]); 44 45 dontUseCmakeConfigure = true; 46 47 buildInputs = [ 48 libsodium 49 zeromq 50 ]; 51 52 dependencies = lib.optionals isPyPy [ cffi ]; 53 54 nativeCheckInputs = [ 55 pytestCheckHook 56 tornado 57 pytest-asyncio 58 ]; 59 60 pythonImportsCheck = [ "zmq" ]; 61 62 preCheck = '' 63 rm -r zmq 64 ''; 65 66 pytestFlagsArray = [ 67 "-m" 68 "'not 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}