blob: cafd6d311463b9bca001b9319a7786e7044525d9 (
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
{ lib
, buildPythonPackage
, fetchPypi
, cython
, isPyPy
, ipython
, python
, scikit-build
, cmake
, pythonOlder
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "line-profiler";
version = "3.5.1";
disabled = pythonOlder "3.6" || isPyPy;
src = fetchPypi {
pname = "line_profiler";
inherit version;
sha256 = "sha256-d0ACCL+9XUNBk4qaOk+1GU9a9/wjstSWyRN1X4MQ6Lg=";
};
nativeBuildInputs = [
cython
cmake
scikit-build
];
propagatedBuildInputs = [
ipython
];
checkInputs = [
pytestCheckHook
];
dontUseCmakeConfigure = true;
preBuild = ''
rm -f _line_profiler.c
'';
checkPhase = ''
PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH cd tests && ${python.interpreter} -m unittest discover -s .
'';
pythonImportsCheck = [
"line_profiler"
];
meta = with lib; {
description = "Line-by-line profiler";
homepage = "https://github.com/pyutils/line_profiler";
license = licenses.bsd3;
maintainers = with maintainers; [ fridh ];
};
}
|