1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 gevent,
6 python,
7 pythonOlder,
8 setuptools,
9}:
10
11buildPythonPackage rec {
12 pname = "yappi";
13 version = "1.6.10";
14 pyproject = true;
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "sumerc";
20 repo = "yappi";
21 tag = version;
22 hash = "sha256-RVa8IzyRuIQMfI0DhKdybJBBwqmyc2KI8XjD0PKQ8M8=";
23 };
24
25 patches = [ ./tests.patch ];
26
27 build-system = [ setuptools ];
28
29 nativeCheckInputs = [ gevent ];
30
31 checkPhase = ''
32 runHook preCheck
33 ${python.interpreter} run_tests.py
34 runHook postCheck
35 '';
36
37 pythonImportsCheck = [ "yappi" ];
38
39 meta = with lib; {
40 description = "Python profiler that supports multithreading and measuring CPU time";
41 mainProgram = "yappi";
42 homepage = "https://github.com/sumerc/yappi";
43 license = licenses.mit;
44 maintainers = with maintainers; [ orivej ];
45 };
46}