about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pytest-benchmark/default.nix
blob: b9def8d834afa9b4b37b5c2924be9ceffbd56c46 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{ lib
, buildPythonPackage
, fetchFromGitHub
, pathlib
, py-cpuinfo
, pytest
, pythonOlder
, statistics
}:

buildPythonPackage rec {
  pname = "pytest-benchmark";
  version = "3.4.1";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "ionelmc";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-qc/8Epax5bPUZvhq42xSj6NUq0T4gbO5dDDS6omWBOU=";
  };

  buildInputs = [
    pytest
  ];

  propagatedBuildInputs = [
    py-cpuinfo
  ] ++ lib.optionals (pythonOlder "3.4") [
    pathlib
    statistics
  ];

  # Circular dependency
  doCheck = false;

  pythonImportsCheck = [
    "pytest_benchmark"
  ];

  meta = with lib; {
    description = "Pytest fixture for benchmarking code";
    homepage = "https://github.com/ionelmc/pytest-benchmark";
    license = licenses.bsd2;
    maintainers = with maintainers; [ costrouc ];
  };
}