2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gevent
|
|
|
|
, python
|
2022-06-16 17:23:12 +00:00
|
|
|
, pythonOlder
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "yappi";
|
2022-11-02 22:02:43 +00:00
|
|
|
version = "1.4.0";
|
2022-06-16 17:23:12 +00:00
|
|
|
format = "setuptools";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-27 00:29:36 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sumerc";
|
|
|
|
repo = pname;
|
2022-11-02 22:02:43 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-AogBnqhLcwsyTHLP+Uxc+EOgYzhdwX5rbi9RMCuC2IU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
patches = [
|
|
|
|
./tests.patch
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
gevent
|
|
|
|
];
|
|
|
|
|
2020-10-27 00:29:36 +00:00
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} run_tests.py
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"yappi"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python profiler that supports multithreading and measuring CPU time";
|
2022-06-16 17:23:12 +00:00
|
|
|
homepage = "https://github.com/sumerc/yappi";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ orivej ];
|
|
|
|
};
|
|
|
|
}
|