diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-02-26 16:20:28 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-02-26 16:20:28 +0100 |
commit | 647438344bfc1f77791391e2b4f98eef865c63dc (patch) | |
tree | ef580867fc6cc413940e4330d939cf1afda082cb /nixpkgs/pkgs/development/python-modules/pytest-benchmark/default.nix | |
parent | b084c6a0fab7f32c904c5c8e8db8dddcefbe507f (diff) | |
parent | e3474e1d1e53b70e2b2af73ea26d6340e82f6b8b (diff) | |
download | nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar.gz nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar.bz2 nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar.lz nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar.xz nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.tar.zst nixlib-647438344bfc1f77791391e2b4f98eef865c63dc.zip |
Merge commit 'e3474e1d1e53'
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pytest-benchmark/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/pytest-benchmark/default.nix | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pytest-benchmark/default.nix b/nixpkgs/pkgs/development/python-modules/pytest-benchmark/default.nix index f9011b6d721b..dc2c27137169 100644 --- a/nixpkgs/pkgs/development/python-modules/pytest-benchmark/default.nix +++ b/nixpkgs/pkgs/development/python-modules/pytest-benchmark/default.nix @@ -14,16 +14,16 @@ , pytestCheckHook , pytest-xdist , pythonOlder -, isPy311 +, setuptools }: buildPythonPackage rec { pname = "pytest-benchmark"; version = "4.0.0"; + pyproject = true; disabled = pythonOlder "3.7"; - format = "setuptools"; src = fetchFromGitHub { owner = "ionelmc"; @@ -33,10 +33,24 @@ buildPythonPackage rec { }; patches = [ + # replace distutils.spawn.find_executable with shutil.which (fetchpatch { url = "https://github.com/ionelmc/pytest-benchmark/commit/728752d2976ef53fde7e40beb3e55f09cf4d4736.patch"; hash = "sha256-WIQADCLey5Y79UJUj9J5E02HQ0O86xBh/3IeGLpVrWI="; }) + # fix tests with python3.11+; https://github.com/ionelmc/pytest-benchmark/pull/232 + (fetchpatch { + url = "https://github.com/ionelmc/pytest-benchmark/commit/b2f624afd68a3090f20187a46284904dd4baa4f6.patch"; + hash = "sha256-cylxPj/d0YzvOGw+ncVSCnQHwq2cukrgXhBHePPwjO0="; + }) + (fetchpatch { + url = "https://github.com/ionelmc/pytest-benchmark/commit/2b987f5be1873617f02f24cb6d76196f9aed21bd.patch"; + hash = "sha256-92kWEd935Co6uc/1y5OGKsc5/or81bORSdaiQFjDyTw="; + }) + ]; + + nativeBuildInputs = [ + setuptools ]; buildInputs = [ @@ -64,24 +78,23 @@ buildPythonPackage rec { mercurial pytestCheckHook pytest-xdist - ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); + ] ++ lib.flatten (lib.attrValues passthru.optional-dependencies); + + pytestFlagsArray = [ + "-W" "ignore::DeprecationWarning" + ]; preCheck = '' export PATH="$out/bin:$PATH" ''; - disabledTests = [ + disabledTests = lib.optionals (pythonOlder "3.12") [ # AttributeError: 'PluginImportFixer' object has no attribute 'find_spec' "test_compare_1" "test_compare_2" "test_regression_checks" + "test_regression_checks_inf" "test_rendering" - ] - # tests are broken in 3.11 - # https://github.com/ionelmc/pytest-benchmark/issues/231 - ++ lib.optionals isPy311 [ - "test_abort_broken" - "test_clonefunc" ]; meta = with lib; { |