1{ lib
2, argon2_cffi
3, attrs
4, buildPythonPackage
5, cbor
6, cbor2
7, cffi
8, cryptography
9, fetchPypi
10, flatbuffers
11, mock
12, msgpack
13, passlib
14, pynacl
15, pytest-asyncio
16, pytestCheckHook
17, pythonOlder
18, twisted
19, py-ubjson
20, txaio
21, ujson
22, zope_interface
23}:
24
25buildPythonPackage rec {
26 pname = "autobahn";
27 version = "21.3.1";
28 disabled = pythonOlder "3.7";
29
30 src = fetchPypi {
31 inherit pname version;
32 sha256 = "00wf9dkfgakg80gy62prg650lb8zz9y9fdlxwxcznwp8hgsw29p1";
33 };
34
35 propagatedBuildInputs = [
36 argon2_cffi
37 cbor
38 cbor2
39 cffi
40 cryptography
41 flatbuffers
42 msgpack
43 passlib
44 py-ubjson
45 pynacl
46 twisted
47 txaio
48 ujson
49 zope_interface
50 ];
51
52 checkInputs = [
53 mock
54 pytest-asyncio
55 pytestCheckHook
56 ];
57
58 postPatch = ''
59 substituteInPlace setup.py \
60 --replace "pytest>=2.8.6,<3.3.0" "pytest"
61 '';
62
63 preCheck = ''
64 # Run asyncio tests (requires twisted)
65 export USE_ASYNCIO=1
66 '';
67
68 pytestFlagsArray = [ "--pyargs autobahn" ];
69
70 pythonImportsCheck = [ "autobahn" ];
71
72 meta = with lib; {
73 description = "WebSocket and WAMP in Python for Twisted and asyncio";
74 homepage = "https://crossbar.io/autobahn";
75 license = licenses.mit;
76 maintainers = with maintainers; [ ];
77 };
78}