2018-08-10 20:38:38 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytest
|
|
|
|
, py-cpuinfo
|
|
|
|
, pythonOlder
|
|
|
|
, pathlib
|
|
|
|
, statistics
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-benchmark";
|
2019-01-18 18:56:00 +00:00
|
|
|
version = "3.2.2";
|
2018-08-10 20:38:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ionelmc";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2019-01-18 18:56:00 +00:00
|
|
|
sha256 = "1hslzzinpwc1zqhbpllqh3sllmiyk69pcycl7ahr0rz3micgwczj";
|
2018-08-10 20:38:38 +00:00
|
|
|
};
|
|
|
|
|
2019-11-24 19:14:31 +00:00
|
|
|
propagatedBuildInputs = [ pytest py-cpuinfo ] ++ lib.optionals (pythonOlder "3.4") [ pathlib statistics ];
|
2018-08-10 20:38:38 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Py.test fixture for benchmarking code";
|
|
|
|
homepage = https://github.com/ionelmc/pytest-benchmark;
|
|
|
|
license = lib.licenses.bsd2;
|
|
|
|
maintainers = with lib.maintainers; [ costrouc ];
|
|
|
|
};
|
|
|
|
}
|