about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/yappi/default.nix
blob: af650f6db3b8b60469f5f40afa84805724c26bea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{ lib
, buildPythonPackage
, fetchFromGitHub
, gevent
, isPy27
, python
}:

buildPythonPackage rec {
  pname = "yappi";
  version = "1.3.2";

  disabled = isPy27; # invalid syntax

  src = fetchFromGitHub {
    owner = "sumerc";
    repo = pname;
    rev = "8bf7a650066f104f59c3cae4a189ec15e7d51c8c";
    sha256 = "1q8lr9n0lny2g3mssy3mksbl9m4k1kqn1a4yv1hfqsahxdvpw2dp";
  };

  patches = [ ./tests.patch ];

  checkInputs = [
    gevent
  ];

  checkPhase = ''
    ${python.interpreter} run_tests.py
  '';

  pythonImportsCheck = [
    "yappi"
  ];

  meta = with lib; {
    homepage = "https://github.com/sumerc/yappi";
    description = "Python profiler that supports multithreading and measuring CPU time";
    license = licenses.mit;
    maintainers = with maintainers; [ orivej ];
  };
}