depot/third_party/nixpkgs/pkgs/development/python-modules/pytest-benchmark/default.nix
Default email 14910f5943 Project import generated by Copybara.
GitOrigin-RevId: 5aaed40d22f0d9376330b6fa413223435ad6fee5
2022-01-13 15:06:32 -05:00

47 lines
855 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pathlib
, py-cpuinfo
, pytest
, pythonOlder
, statistics
}:
buildPythonPackage rec {
pname = "pytest-benchmark";
version = "3.4.1";
format = "setuptools";
src = fetchFromGitHub {
owner = "ionelmc";
repo = pname;
rev = "v${version}";
sha256 = "sha256-qc/8Epax5bPUZvhq42xSj6NUq0T4gbO5dDDS6omWBOU=";
};
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 ];
};
}