2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, six
|
|
|
|
, statistics
|
|
|
|
, pythonOlder
|
|
|
|
, nose
|
|
|
|
, psutil
|
|
|
|
, contextlib2
|
|
|
|
, mock
|
|
|
|
, unittest2
|
|
|
|
, isPy27
|
|
|
|
, python
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyperf";
|
2021-04-26 19:14:03 +00:00
|
|
|
version = "2.2.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-04-26 19:14:03 +00:00
|
|
|
sha256 = "498bb4d1fe21350c2b7c1aa8bb3eae9c9979358d0b66327954bc66839fcba8b6";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [ nose psutil ] ++
|
|
|
|
lib.optionals isPy27 [ contextlib2 mock unittest2 ];
|
|
|
|
propagatedBuildInputs = [ six ] ++
|
|
|
|
lib.optionals (pythonOlder "3.4") [ statistics ];
|
|
|
|
|
|
|
|
# tests not included in pypi repository
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m nose
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module to generate and modify perf";
|
|
|
|
homepage = "https://pyperf.readthedocs.io/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|