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 propagatedBuildInputs = [ pytest py-cpuinfo ] ++ lib.optional (pythonOlder "3.4") [ pathlib statistics ];
23
24 meta = {
25 description = "Py.test fixture for benchmarking code";
26 homepage = https://github.com/ionelmc/pytest-benchmark;
27 license = lib.licenses.bsd2;
28 maintainers = with lib.maintainers; [ costrouc ];
29 };
30}