1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytestrunner
5, pytest
6, py-cpuinfo
7, pythonOlder
8, pathlib
9, statistics
10}:
11
12buildPythonPackage rec {
13 pname = "pytest-benchmark";
14 version = "3.1.1";
15
16 src = fetchFromGitHub {
17 owner = "ionelmc";
18 repo = pname;
19 rev = "v${version}";
20 sha256 = "1ch079dlc6c9ag74dh4dg6plkmh0h8kn78ari3fgadc75bald71m";
21 };
22
23 propagatedBuildInputs = [ pytest py-cpuinfo ] ++ lib.optional (pythonOlder "3.4") [ pathlib statistics ];
24
25 meta = {
26 description = "Py.test fixture for benchmarking code";
27 homepage = https://github.com/ionelmc/pytest-benchmark;
28 license = lib.licenses.bsd2;
29 maintainers = with lib.maintainers; [ costrouc ];
30 };
31}