2017-04-18 09:50:18 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, cython
|
|
|
|
, isPyPy
|
2017-05-03 06:50:48 +00:00
|
|
|
, ipython
|
|
|
|
, python
|
2020-05-10 08:27:56 +00:00
|
|
|
, scikit-build
|
2020-06-24 16:55:48 +00:00
|
|
|
, cmake
|
2017-04-18 09:50:18 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "line_profiler";
|
2020-11-29 14:04:33 +00:00
|
|
|
version = "3.1.0";
|
2017-04-18 09:50:18 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-29 14:04:33 +00:00
|
|
|
sha256 = "e73ff429236d59d48ce7028484becfa01449b3d52abdcf7337e0ff2acdc5093c";
|
2017-04-18 09:50:18 +00:00
|
|
|
};
|
|
|
|
|
2020-06-24 16:55:48 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
cmake
|
|
|
|
scikit-build
|
|
|
|
];
|
2019-07-14 19:00:36 +00:00
|
|
|
|
2020-06-24 16:55:48 +00:00
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
ipython
|
|
|
|
];
|
2017-05-03 06:50:48 +00:00
|
|
|
|
2017-04-18 09:50:18 +00:00
|
|
|
disabled = isPyPy;
|
|
|
|
|
2019-07-14 19:00:36 +00:00
|
|
|
preBuild = ''
|
|
|
|
rm -f _line_profiler.c
|
|
|
|
'';
|
|
|
|
|
2020-06-24 16:55:48 +00:00
|
|
|
checkInputs = [
|
|
|
|
ipython
|
|
|
|
];
|
|
|
|
|
2017-05-03 06:50:48 +00:00
|
|
|
checkPhase = ''
|
2020-06-24 16:55:48 +00:00
|
|
|
PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH cd tests && ${python.interpreter} -m unittest discover -s .
|
2017-05-03 06:50:48 +00:00
|
|
|
'';
|
|
|
|
|
2017-04-18 09:50:18 +00:00
|
|
|
meta = {
|
|
|
|
description = "Line-by-line profiler";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/rkern/line_profiler";
|
2017-04-18 09:50:18 +00:00
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = with lib.maintainers; [ fridh ];
|
|
|
|
};
|
2019-07-14 19:00:36 +00:00
|
|
|
}
|