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