1{
2 lib,
3 buildPythonPackage,
4 cffi,
5 fetchFromGitHub,
6 filelock,
7 hatchling,
8 importlib-metadata,
9 pytest-benchmark,
10 pytest-cov-stub,
11 pytest-xdist,
12 pytest,
13 pytestCheckHook,
14 rich,
15 semver,
16 setuptools,
17}:
18
19buildPythonPackage rec {
20 pname = "pytest-codspeed";
21 version = "3.2.0";
22 pyproject = true;
23
24 src = fetchFromGitHub {
25 owner = "CodSpeedHQ";
26 repo = "pytest-codspeed";
27 tag = "v${version}";
28 hash = "sha256-SNVJtnanaSQTSeX3EFG+21GFC1WFCQTbaNyi7QjQROw=";
29 };
30
31 build-system = [ hatchling ];
32
33 buildInputs = [ pytest ];
34
35 dependencies = [
36 cffi
37 filelock
38 importlib-metadata
39 rich
40 setuptools
41 ];
42
43 optional-dependencies = {
44 compat = [
45 pytest-benchmark
46 pytest-xdist
47 ];
48 };
49
50 nativeCheckInputs = [
51 semver
52 pytest-cov-stub
53 pytestCheckHook
54 ];
55
56 pythonImportsCheck = [ "pytest_codspeed" ];
57
58 meta = {
59 description = "Pytest plugin to create CodSpeed benchmarks";
60 homepage = "https://github.com/CodSpeedHQ/pytest-codspeed";
61 changelog = "https://github.com/CodSpeedHQ/pytest-codspeed/releases/tag/${src.tag}";
62 license = lib.licenses.mit;
63 maintainers = with lib.maintainers; [ fab ];
64 };
65}