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
|
2022-08-12 12:06:08 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2022-01-03 16:56:52 +00:00
|
|
|
pname = "line-profiler";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "4.0.2";
|
|
|
|
format = "setuptools";
|
2022-01-03 16:56:52 +00:00
|
|
|
|
|
|
|
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;
|
2022-12-17 10:02:37 +00:00
|
|
|
hash = "sha256-JejJ1CSNxIkFgBhR/4p1ucdIJ6CHHRGNEQTY5D1/sPw=";
|
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
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
pytestCheckHook
|
2022-01-03 16:56:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/pyutils/line_profiler/blob/v${version}/CHANGELOG.rst";
|
2022-01-03 16:56:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ fridh ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|