a0cb138ada
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
47 lines
853 B
Nix
47 lines
853 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pathlib
|
|
, py-cpuinfo
|
|
, pytest
|
|
, pythonOlder
|
|
, statistics
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pytest-benchmark";
|
|
version = "4.0.0";
|
|
format = "setuptools";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ionelmc";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-f9Ty4+5PycraxoLUSa9JFusV5Cot6bBWKfOGHZIRR3o=";
|
|
};
|
|
|
|
buildInputs = [
|
|
pytest
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
py-cpuinfo
|
|
] ++ lib.optionals (pythonOlder "3.4") [
|
|
pathlib
|
|
statistics
|
|
];
|
|
|
|
# Circular dependency
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [
|
|
"pytest_benchmark"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Pytest fixture for benchmarking code";
|
|
homepage = "https://github.com/ionelmc/pytest-benchmark";
|
|
license = licenses.bsd2;
|
|
maintainers = with maintainers; [ costrouc ];
|
|
};
|
|
}
|