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