From eb6e376753619cb1fcb57e3ef2075e836ec9dd3e Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Fri, 10 Aug 2018 16:38:38 -0400 Subject: [PATCH] pythonPackages.pytest-benchmark: init at 3.1.1 - fetchFromGitHub to get all tests - all tests pass - python 2.7, 3+ --- .../pytest-benchmark/default.nix | 31 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/python-modules/pytest-benchmark/default.nix diff --git a/pkgs/development/python-modules/pytest-benchmark/default.nix b/pkgs/development/python-modules/pytest-benchmark/default.nix new file mode 100644 index 00000000000..0f3475f715d --- /dev/null +++ b/pkgs/development/python-modules/pytest-benchmark/default.nix @@ -0,0 +1,31 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestrunner +, pytest +, py-cpuinfo +, pythonOlder +, pathlib +, statistics +}: + +buildPythonPackage rec { + pname = "pytest-benchmark"; + version = "3.1.1"; + + src = fetchFromGitHub { + owner = "ionelmc"; + repo = pname; + rev = "v${version}"; + sha256 = "1ch079dlc6c9ag74dh4dg6plkmh0h8kn78ari3fgadc75bald71m"; + }; + + propagatedBuildInputs = [ pytest py-cpuinfo ] ++ lib.optional (pythonOlder "3.4") [ pathlib statistics ]; + + meta = { + description = "Py.test fixture for benchmarking code"; + homepage = https://github.com/ionelmc/pytest-benchmark; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ costrouc ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fdf3e91cbb9..c2a1237e4e9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1844,6 +1844,8 @@ in { pytest-aiohttp = callPackage ../development/python-modules/pytest-aiohttp { }; + pytest-benchmark = callPackage ../development/python-modules/pytest-benchmark { }; + pytestcache = callPackage ../development/python-modules/pytestcache { }; pytest-catchlog = callPackage ../development/python-modules/pytest-catchlog { };