2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
cython,
|
|
|
|
isPyPy,
|
|
|
|
ipython,
|
|
|
|
scikit-build,
|
|
|
|
cmake,
|
|
|
|
pythonOlder,
|
|
|
|
pytestCheckHook,
|
|
|
|
ubelt,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2022-01-03 16:56:52 +00:00
|
|
|
pname = "line-profiler";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "4.1.3";
|
2022-12-17 10:02:37 +00:00
|
|
|
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;
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-5fESPDZywyGLoGPCO9ZKURWeRGSf7WeAuZPHgfte0xg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
nativeBuildInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
cython
|
2020-07-18 16:06:22 +00:00
|
|
|
cmake
|
|
|
|
scikit-build
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
ipython = [ 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
|
2023-11-16 04:20:00 +00:00
|
|
|
ubelt
|
|
|
|
] ++ passthru.optional-dependencies.ipython;
|
2022-01-03 16:56:52 +00:00
|
|
|
|
|
|
|
dontUseCmakeConfigure = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
rm -f _line_profiler.c
|
|
|
|
'';
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
preCheck = ''
|
|
|
|
rm -r line_profiler
|
|
|
|
export PATH=$out/bin:$PATH
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "line_profiler" ];
|
2022-01-03 16:56:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Line-by-line profiler";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "kernprof";
|
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;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|