1{ lib
2, buildPythonPackage
3, fetchPypi
4, isPy27
5, mock
6, pytest
7, selectors2
8}:
9
10buildPythonPackage rec {
11 pname = "wurlitzer";
12 version = "3.0.2";
13
14 src = fetchPypi {
15 inherit pname version;
16 sha256 = "36051ac530ddb461a86b6227c4b09d95f30a1d1043de2b4a592e97ae8a84fcdf";
17 };
18
19 propagatedBuildInputs = lib.optionals isPy27 [ selectors2 ];
20
21 checkInputs = [ mock pytest ];
22
23 checkPhase = ''
24 py.test test.py
25 '';
26
27 meta = {
28 description = "Capture C-level output in context managers";
29 homepage = "https://github.com/minrk/wurlitzer";
30 license = lib.licenses.mit;
31 };
32}