2ce89355c3
GitOrigin-RevId: 22a81aa5fc15b2d41b12f7160a71cd4a9f3c3fa1
43 lines
861 B
Nix
43 lines
861 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, six
|
|
, statistics
|
|
, pythonOlder
|
|
, nose
|
|
, psutil
|
|
, contextlib2
|
|
, mock
|
|
, unittest2
|
|
, isPy27
|
|
, python
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pyperf";
|
|
version = "2.0.0";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "2189fbc4af08d519f85468e70e32c902eab0f1341b2c41028b94b2832d3169a7";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|