1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytest,
6 pytestCheckHook,
7 poetry-core,
8}:
9
10buildPythonPackage rec {
11 pname = "pytest-reraise";
12 version = "2.1.2";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "bjoluc";
17 repo = pname;
18 tag = "v${version}";
19 hash = "sha256-mgNKoZ+2sinArTZhSwhLxzBTb4QfiT1LWBs7w5MHXWA=";
20 };
21
22 postPatch = ''
23 substituteInPlace pyproject.toml \
24 --replace-fail 'poetry>=0.12' 'poetry-core>=1.0.0' \
25 --replace-fail 'poetry.masonry' 'poetry.core.masonry'
26 '';
27
28 build-system = [ poetry-core ];
29
30 dependencies = [ pytest ];
31
32 nativeCheckInputs = [ pytestCheckHook ];
33
34 pythonImportsCheck = [ "pytest_reraise" ];
35
36 meta = {
37 description = "Make multi-threaded pytest test cases fail when they should";
38 longDescription = ''
39 Make multi-threaded pytest test cases fail when they should
40 '';
41 homepage = "https://github.com/bjoluc/pytest-reraise";
42 changelog = "https://github.com/bjoluc/pytest-reraise/releases/tag/${src.tag}";
43 license = lib.licenses.mit;
44 maintainers = with lib.maintainers; [ cpcloud ];
45 };
46}