2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
isPyPy,
|
|
|
|
buildPythonPackage,
|
|
|
|
pytest-fixture-config,
|
|
|
|
fetchpatch,
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# build-time
|
|
|
|
setuptools,
|
|
|
|
setuptools-git,
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# runtime
|
|
|
|
pytest,
|
|
|
|
mock,
|
|
|
|
path,
|
|
|
|
execnet,
|
|
|
|
termcolor,
|
|
|
|
six,
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# tests
|
|
|
|
pytestCheckHook,
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-shutil";
|
2024-05-15 15:35:15 +00:00
|
|
|
inherit (pytest-fixture-config) version src;
|
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
sourceRoot = "${src.name}/pytest-shutil";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
# imp was removed in Python 3.12
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "stop-using-imp.patch";
|
|
|
|
url = "https://build.opensuse.org/public/source/openSUSE:Factory/python-pytest-shutil/stop-using-imp.patch?rev=10";
|
|
|
|
hash = "sha256-L8tXoQ9q8o6aP3TpJY/sUVVbUd/ebw0h6de6dBj1WNY=";
|
|
|
|
stripLen = 1;
|
|
|
|
})
|
2023-01-20 10:41:00 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [
|
|
|
|
setuptools
|
2023-01-20 10:41:00 +00:00
|
|
|
setuptools-git
|
2024-05-15 15:35:15 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ pytest ];
|
|
|
|
|
|
|
|
dependencies = [
|
2023-01-20 10:41:00 +00:00
|
|
|
mock
|
|
|
|
path
|
|
|
|
execnet
|
|
|
|
termcolor
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests =
|
|
|
|
[ "test_pretty_formatter" ]
|
|
|
|
++ lib.optionals isPyPy [
|
|
|
|
"test_run"
|
|
|
|
"test_run_integration"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Goodie-bag of unix shell and environment tools for py.test";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/manahl/pytest-plugins";
|
|
|
|
maintainers = with maintainers; [ ryansydnor ];
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|