1{ lib, buildPythonPackage, fetchPypi, isPy3k, isPy33,
2 six, txaio, twisted, zope_interface, cffi, asyncio, trollius, futures,
3 mock, pytest
4}:
5buildPythonPackage rec {
6 pname = "autobahn";
7 version = "19.1.1";
8
9 src = fetchPypi {
10 inherit pname version;
11 sha256 = "aebbadb700c13792a2967c79002855d1153b9ec8f2949d169e908388699596ff";
12 };
13
14 propagatedBuildInputs = [ six txaio twisted zope_interface cffi ] ++
15 (lib.optional isPy33 asyncio) ++
16 (lib.optionals (!isPy3k) [ trollius futures ]);
17
18 checkInputs = [ mock pytest ];
19 checkPhase = ''
20 runHook preCheck
21 USE_TWISTED=true py.test $out
22 runHook postCheck
23 '';
24
25 meta = with lib; {
26 description = "WebSocket and WAMP in Python for Twisted and asyncio.";
27 homepage = "https://crossbar.io/autobahn";
28 license = licenses.mit;
29 maintainers = with maintainers; [ nand0p ];
30 };
31}