diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pyperf')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/pyperf/default.nix | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pyperf/default.nix b/nixpkgs/pkgs/development/python-modules/pyperf/default.nix new file mode 100644 index 00000000000..4b14e2e5cc6 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/pyperf/default.nix @@ -0,0 +1,43 @@ +{ lib +, buildPythonPackage +, fetchPypi +, six +, statistics +, pythonOlder +, nose +, psutil +, contextlib2 +, mock +, unittest2 +, isPy27 +, python +}: + +buildPythonPackage rec { + pname = "pyperf"; + version = "1.7.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "0d214aa65e085d3e4108a36152cb12f7cd0f4e7fda93b5134b43a9687c975786"; + }; + + 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 ]; + }; +} |