1{ lib
2, buildPythonPackage
3, fetchPypi
4, six
5, statistics
6, pythonOlder
7, nose
8, psutil
9, contextlib2
10, mock
11, unittest2
12, isPy27
13, python
14}:
15
16buildPythonPackage rec {
17 pname = "pyperf";
18 version = "2.4.1";
19
20 src = fetchPypi {
21 inherit pname version;
22 sha256 = "sha256-OM9ekMVvkGqDIM6CpQv6kskCuTr/1y5NyBWAEV81WFM=";
23 };
24
25 checkInputs = [ nose psutil ] ++
26 lib.optionals isPy27 [ contextlib2 mock unittest2 ];
27 propagatedBuildInputs = [ six ] ++
28 lib.optionals (pythonOlder "3.4") [ statistics ];
29
30 # tests not included in pypi repository
31 doCheck = false;
32
33 checkPhase = ''
34 ${python.interpreter} -m nose
35 '';
36
37 meta = with lib; {
38 description = "Python module to generate and modify perf";
39 homepage = "https://pyperf.readthedocs.io/";
40 license = licenses.mit;
41 maintainers = [ maintainers.costrouc ];
42 };
43}