1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 attrs, 6 argon2-cffi, 7 base58, 8 cbor2, 9 cffi, 10 click, 11 cryptography, 12 ecdsa, 13 eth-abi, 14 eth-account, 15 flatbuffers, 16 jinja2, 17 hkdf, 18 hyperlink, 19 mnemonic, 20 mock, 21 msgpack, 22 passlib, 23 py-ecc, 24 # , py-eth-sig-utils 25 py-multihash, 26 py-ubjson, 27 pynacl, 28 pygobject3, 29 pyopenssl, 30 qrcode, 31 pytest-asyncio_0_21, 32 python-snappy, 33 pytestCheckHook, 34 pythonOlder, 35 # , pytrie 36 rlp, 37 service-identity, 38 setuptools, 39 spake2, 40 twisted, 41 txaio, 42 ujson, 43 # , web3 44 # , wsaccel 45 # , xbr 46 yapf, 47 # , zlmdb 48 zope-interface, 49}@args: 50 51buildPythonPackage rec { 52 pname = "autobahn"; 53 version = "23.6.2"; 54 pyproject = true; 55 56 disabled = pythonOlder "3.9"; 57 58 src = fetchPypi { 59 inherit pname version; 60 hash = "sha256-7JQhxSohAzZNHvBGgDbmAZ7oT3FyHoazb+Ga1pZsEYE="; 61 }; 62 63 postPatch = '' 64 substituteInPlace setup.py \ 65 --replace-fail "pytest>=2.8.6,<3.3.0" "pytest" 66 ''; 67 68 build-system = [ setuptools ]; 69 70 dependencies = [ 71 cryptography 72 hyperlink 73 pynacl 74 txaio 75 ]; 76 77 nativeCheckInputs = 78 [ 79 mock 80 pytest-asyncio_0_21 81 pytestCheckHook 82 ] 83 ++ optional-dependencies.scram ++ optional-dependencies.serialization ++ optional-dependencies.xbr; 84 85 preCheck = '' 86 # Run asyncio tests (requires twisted) 87 export USE_ASYNCIO=1 88 ''; 89 90 pytestFlagsArray = [ "--pyargs autobahn" ]; 91 92 pythonImportsCheck = [ "autobahn" ]; 93 94 optional-dependencies = rec { 95 all = accelerate ++ compress ++ encryption ++ nvx ++ serialization ++ scram ++ twisted ++ ui ++ xbr; 96 accelerate = [ 97 # wsaccel 98 ]; 99 compress = [ python-snappy ]; 100 encryption = [ 101 pynacl 102 pyopenssl 103 qrcode # pytrie 104 service-identity 105 ]; 106 nvx = [ cffi ]; 107 scram = [ 108 argon2-cffi 109 cffi 110 passlib 111 ]; 112 serialization = [ 113 cbor2 114 flatbuffers 115 msgpack 116 ujson 117 py-ubjson 118 ]; 119 twisted = [ 120 attrs 121 args.twisted 122 zope-interface 123 ]; 124 ui = [ pygobject3 ]; 125 xbr = [ 126 base58 127 cbor2 128 click 129 ecdsa 130 eth-abi 131 jinja2 132 hkdf 133 mnemonic 134 py-ecc # py-eth-sig-utils 135 py-multihash 136 rlp 137 spake2 138 twisted # web3 xbr 139 yapf # zlmdb 140 ]; 141 }; 142 143 meta = with lib; { 144 description = "WebSocket and WAMP in Python for Twisted and asyncio"; 145 homepage = "https://crossbar.io/autobahn"; 146 license = licenses.mit; 147 maintainers = with maintainers; [ ]; 148 }; 149}