2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, cython
|
|
|
|
, isPyPy
|
|
|
|
, ipython
|
|
|
|
, python
|
2020-06-02 18:00:15 +00:00
|
|
|
, scikit-build
|
2020-07-18 16:06:22 +00:00
|
|
|
, cmake
|
2022-01-03 16:56:52 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2022-01-03 16:56:52 +00:00
|
|
|
pname = "line-profiler";
|
|
|
|
version = "3.4.0";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6" || isPyPy;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2022-01-03 16:56:52 +00:00
|
|
|
pname = "line_profiler";
|
|
|
|
inherit version;
|
|
|
|
sha256 = "b6b0a8100a2829358e31ef7c6f427b1dcf2b1d8e5d38b55b219719ecf758aee5";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
cmake
|
|
|
|
scikit-build
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
ipython
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
checkInputs = [
|
|
|
|
ipython
|
|
|
|
];
|
|
|
|
|
|
|
|
dontUseCmakeConfigure = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
rm -f _line_profiler.c
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
2020-07-18 16:06:22 +00:00
|
|
|
PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH cd tests && ${python.interpreter} -m unittest discover -s .
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"line_profiler"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Line-by-line profiler";
|
2022-01-03 16:56:52 +00:00
|
|
|
homepage = "https://github.com/pyutils/line_profiler";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ fridh ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|