20 buildPythonPackage rec {
21 pname = "pytest-benchmark";
25 disabled = pythonOlder "3.7";
28 src = fetchFromGitHub {
32 hash = "sha256-f9Ty4+5PycraxoLUSa9JFusV5Cot6bBWKfOGHZIRR3o=";
36 # replace distutils.spawn.find_executable with shutil.which
38 url = "https://github.com/ionelmc/pytest-benchmark/commit/728752d2976ef53fde7e40beb3e55f09cf4d4736.patch";
39 hash = "sha256-WIQADCLey5Y79UJUj9J5E02HQ0O86xBh/3IeGLpVrWI=";
41 # fix tests with python3.11+; https://github.com/ionelmc/pytest-benchmark/pull/232
43 url = "https://github.com/ionelmc/pytest-benchmark/commit/b2f624afd68a3090f20187a46284904dd4baa4f6.patch";
44 hash = "sha256-cylxPj/d0YzvOGw+ncVSCnQHwq2cukrgXhBHePPwjO0=";
47 url = "https://github.com/ionelmc/pytest-benchmark/commit/2b987f5be1873617f02f24cb6d76196f9aed21bd.patch";
48 hash = "sha256-92kWEd935Co6uc/1y5OGKsc5/or81bORSdaiQFjDyTw=";
60 propagatedBuildInputs = [
64 passthru.optional-dependencies = {
65 aspect = [ aspectlib ];
66 histogram = [ pygal ];
67 elasticsearch = [ elasticsearch ];
70 pythonImportsCheck = [
81 ] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
84 "-W" "ignore::DeprecationWarning"
88 export PATH="$out/bin:$PATH"
91 disabledTests = lib.optionals (pythonOlder "3.12") [
92 # AttributeError: 'PluginImportFixer' object has no attribute 'find_spec'
95 "test_regression_checks"
96 "test_regression_checks_inf"
101 changelog = "https://github.com/ionelmc/pytest-benchmark/blob/${src.rev}/CHANGELOG.rst";
102 description = "Pytest fixture for benchmarking code";
103 homepage = "https://github.com/ionelmc/pytest-benchmark";
104 license = licenses.bsd2;
105 maintainers = with maintainers; [ dotlambda ];