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