depot/third_party/nixpkgs/pkgs/development/python-modules/pytest-harvest/default.nix
Default email c7cb07f092 Project import generated by Copybara.
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
2024-02-29 21:09:43 +01:00

68 lines
1.4 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools-scm
, pytest-runner
, pytest
, decopatch
, makefun
, six
, pytestCheckHook
, numpy
, pandas
, tabulate
, pytest-cases
, pythonOlder
}:
buildPythonPackage rec {
pname = "pytest-harvest";
version = "1.10.4";
pyproject = true;
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "smarie";
repo = "python-pytest-harvest";
rev = "refs/tags/${version}";
hash = "sha256-ebzE63d7zt9G9HgbLHaE/USZZpUd3y3vd0kNdT/wWw0=";
};
# create file, that is created by setuptools_scm
# we disable this file creation as it touches internet
postPatch = ''
echo "version = '${version}'" > pytest_harvest/_version.py
'';
nativeBuildInputs = [
setuptools-scm
pytest-runner
];
buildInputs = [ pytest ];
propagatedBuildInputs = [
decopatch
makefun
six
];
nativeCheckInputs = [
pytestCheckHook
numpy
pandas
tabulate
pytest-cases
];
pythonImportsCheck = [ "pytest_harvest" ];
meta = with lib; {
description = "Store data created during your `pytest` tests execution, and retrieve it at the end of the session, e.g. for applicative benchmarking purposes";
homepage = "https://github.com/smarie/python-pytest-harvest";
changelog = "https://github.com/smarie/python-pytest-harvest/releases/tag/${src.rev}";
license = licenses.bsd3;
maintainers = with maintainers; [ mbalatsko ];
};
}