about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pytest-benchmark
diff options
context:
space:
mode:
authorChris Ostrouchov <chris.ostrouchov@gmail.com>2018-08-10 16:38:38 -0400
committerChris Ostrouchov <chris.ostrouchov@gmail.com>2018-08-10 16:38:38 -0400
commiteb6e376753619cb1fcb57e3ef2075e836ec9dd3e (patch)
tree34fc9ba7714cc47820892ba12095516d7baab671 /pkgs/development/python-modules/pytest-benchmark
parent6e9d37713a867946d299491d241ce16a815dd539 (diff)
pythonPackages.pytest-benchmark: init at 3.1.1
 - fetchFromGitHub to get all tests
 - all tests pass
 - python 2.7, 3+
Diffstat (limited to 'pkgs/development/python-modules/pytest-benchmark')
-rw-r--r--pkgs/development/python-modules/pytest-benchmark/default.nix31
1 files changed, 31 insertions, 0 deletions
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 0000000000000..0f3475f715d0d
--- /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 ];
+  };
+}