1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools-scm,
6 pytest-runner,
7 pytest,
8 decopatch,
9 makefun,
10 six,
11 pytestCheckHook,
12 numpy,
13 pandas,
14 tabulate,
15 pytest-cases,
16 pythonOlder,
17}:
18
19buildPythonPackage rec {
20 pname = "pytest-harvest";
21 version = "1.10.5";
22 pyproject = true;
23
24 disabled = pythonOlder "3.6";
25
26 src = fetchFromGitHub {
27 owner = "smarie";
28 repo = "python-pytest-harvest";
29 rev = "refs/tags/${version}";
30 hash = "sha256-s8QiuUFRTTRhSpLa0DHScKFC9xdu+w2rssWCg8sIjsg=";
31 };
32
33 # create file, that is created by setuptools_scm
34 # we disable this file creation as it touches internet
35 postPatch = ''
36 echo "version = '${version}'" > pytest_harvest/_version.py
37 '';
38
39 nativeBuildInputs = [
40 setuptools-scm
41 pytest-runner
42 ];
43
44 buildInputs = [ pytest ];
45
46 propagatedBuildInputs = [
47 decopatch
48 makefun
49 six
50 ];
51
52 nativeCheckInputs = [
53 pytestCheckHook
54 numpy
55 pandas
56 tabulate
57 pytest-cases
58 ];
59
60 pythonImportsCheck = [ "pytest_harvest" ];
61
62 meta = with lib; {
63 description = "Store data created during your `pytest` tests execution, and retrieve it at the end of the session, e.g. for applicative benchmarking purposes";
64 homepage = "https://github.com/smarie/python-pytest-harvest";
65 changelog = "https://github.com/smarie/python-pytest-harvest/releases/tag/${src.rev}";
66 license = licenses.bsd3;
67 maintainers = with maintainers; [ mbalatsko ];
68 };
69}