blob: 6b04151f1eb14a91c3c9c08fb0dffe6f9a0741ee (
plain)
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
61
62
63
|
{
lib,
buildPythonPackage,
fetchPypi,
cython,
isPyPy,
ipython,
scikit-build,
cmake,
pytestCheckHook,
ubelt,
}:
buildPythonPackage rec {
pname = "line-profiler";
version = "5.0.0";
format = "setuptools";
disabled = isPyPy;
src = fetchPypi {
pname = "line_profiler";
inherit version;
hash = "sha256-qA8K+wW6DSddnd3F/5fqtjdHEWf/Pmbcx9E1dVBZOYw=";
};
nativeBuildInputs = [
cython
cmake
scikit-build
];
optional-dependencies = {
ipython = [ ipython ];
};
nativeCheckInputs = [
pytestCheckHook
ubelt
]
++ optional-dependencies.ipython;
dontUseCmakeConfigure = true;
preBuild = ''
rm -f _line_profiler.c
'';
preCheck = ''
rm -r line_profiler
export PATH=$out/bin:$PATH
'';
pythonImportsCheck = [ "line_profiler" ];
meta = {
description = "Line-by-line profiler";
mainProgram = "kernprof";
homepage = "https://github.com/pyutils/line_profiler";
changelog = "https://github.com/pyutils/line_profiler/blob/v${version}/CHANGELOG.rst";
license = lib.licenses.bsd3;
};
}
|