1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pathlib 5, py-cpuinfo 6, pytest 7, pythonOlder 8, statistics 9}: 10 11buildPythonPackage rec { 12 pname = "pytest-benchmark"; 13 version = "3.4.1"; 14 format = "setuptools"; 15 16 src = fetchFromGitHub { 17 owner = "ionelmc"; 18 repo = pname; 19 rev = "v${version}"; 20 sha256 = "sha256-qc/8Epax5bPUZvhq42xSj6NUq0T4gbO5dDDS6omWBOU="; 21 }; 22 23 buildInputs = [ 24 pytest 25 ]; 26 27 propagatedBuildInputs = [ 28 py-cpuinfo 29 ] ++ lib.optionals (pythonOlder "3.4") [ 30 pathlib 31 statistics 32 ]; 33 34 # Circular dependency 35 doCheck = false; 36 37 pythonImportsCheck = [ 38 "pytest_benchmark" 39 ]; 40 41 meta = with lib; { 42 description = "Pytest fixture for benchmarking code"; 43 homepage = "https://github.com/ionelmc/pytest-benchmark"; 44 license = licenses.bsd2; 45 maintainers = with maintainers; [ costrouc ]; 46 }; 47}