1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-19 03:47:13 -04:00
nixpkgs/pkgs/development/python-modules/pyperf/default.nix
2022-08-07 12:03:47 +00:00

44 lines
848 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, six
, statistics
, pythonOlder
, nose
, psutil
, contextlib2
, mock
, unittest2
, isPy27
, python
}:
buildPythonPackage rec {
pname = "pyperf";
version = "2.4.1";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-OM9ekMVvkGqDIM6CpQv6kskCuTr/1y5NyBWAEV81WFM=";
};
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 ];
};
}