1{ lib
2, buildPythonPackage
3, fetchPypi
4, cython
5, isPyPy
6, ipython
7, python
8}:
9
10buildPythonPackage rec {
11 pname = "line_profiler";
12 version = "2.1.2";
13
14 src = fetchPypi {
15 inherit pname version;
16 sha256 = "efa66e9e3045aa7cb1dd4bf0106e07dec9f80bc781a993fbaf8162a36c20af5c";
17 };
18
19 patches = [ ./python37.patch ];
20
21 buildInputs = [ cython ];
22
23 propagatedBuildInputs = [ ipython ];
24
25 disabled = isPyPy;
26
27 preBuild = ''
28 rm -f _line_profiler.c
29 '';
30
31 checkPhase = ''
32 ${python.interpreter} -m unittest discover -s tests
33 '';
34
35 meta = {
36 description = "Line-by-line profiler";
37 homepage = https://github.com/rkern/line_profiler;
38 license = lib.licenses.bsd3;
39 maintainers = with lib.maintainers; [ fridh ];
40 };
41}