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