1{ lib
2, buildPythonPackage
3, fetchPypi
4, cython
5, isPyPy
6, ipython
7, python
8, scikit-build
9, cmake
10}:
11
12buildPythonPackage rec {
13 pname = "line_profiler";
14 version = "3.3.1";
15
16 src = fetchPypi {
17 inherit pname version;
18 sha256 = "6e2fb792ca022f900f374f9659fd3e7c530cd4df7d3b7e84be889093b487639f";
19 };
20
21 nativeBuildInputs = [
22 cython
23 cmake
24 scikit-build
25 ];
26
27 dontUseCmakeConfigure = true;
28
29 propagatedBuildInputs = [
30 ipython
31 ];
32
33 disabled = isPyPy;
34
35 preBuild = ''
36 rm -f _line_profiler.c
37 '';
38
39 checkInputs = [
40 ipython
41 ];
42
43 checkPhase = ''
44 PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH cd tests && ${python.interpreter} -m unittest discover -s .
45 '';
46
47 meta = {
48 description = "Line-by-line profiler";
49 homepage = "https://github.com/rkern/line_profiler";
50 license = lib.licenses.bsd3;
51 maintainers = with lib.maintainers; [ fridh ];
52 };
53}