1{ stdenv, buildPythonPackage, fetchPypi, pytest, mock, six, twisted }:
2
3buildPythonPackage rec {
4 name = "${pname}-${version}";
5 pname = "txaio";
6 version = "2.8.2";
7
8 src = fetchPypi {
9 inherit pname version;
10 sha256 = "484cd6c4cdd3f6081b87188f3b2b9a36e02fba6816e8256917c4f6571b567571";
11 };
12
13 buildInputs = [ pytest mock ];
14
15 propagatedBuildInputs = [ six twisted ];
16
17 patchPhase = ''
18 sed -i '152d' test/test_logging.py
19 '';
20
21 # test_chained_callback has been removed just post-2.7.1 because the functionality was decided against and the test
22 # breaks on python 3.6 https://github.com/crossbario/txaio/pull/104
23 checkPhase = ''
24 py.test -k "not (test_sdist or test_chained_callback)"
25 '';
26
27 meta = with stdenv.lib; {
28 description = "Utilities to support code that runs unmodified on Twisted and asyncio.";
29 homepage = "https://github.com/crossbario/txaio";
30 license = licenses.mit;
31 maintainers = with maintainers; [ nand0p ];
32 platforms = platforms.all;
33 };
34}