1{
2 lib,
3 buildPythonPackage,
4 celery,
5 debugpy,
6 docker,
7 fetchFromGitHub,
8 poetry-core,
9 psutil,
10 pytest-cov-stub,
11 pytest-docker-tools,
12 pytest,
13 pytestCheckHook,
14 pythonOlder,
15 setuptools,
16 tenacity,
17}:
18
19buildPythonPackage rec {
20 pname = "pytest-celery";
21 version = "1.1.3";
22 pyproject = true;
23
24 disabled = pythonOlder "3.8";
25
26 src = fetchFromGitHub {
27 owner = "celery";
28 repo = "pytest-celery";
29 tag = "v${version}";
30 hash = "sha256-TUtKfGOxvVkiMhsUqyNDK08OTuzzKHrBiPU4JCKsIKM=";
31 };
32
33 postPatch = ''
34 # Avoid infinite recursion with celery
35 substituteInPlace pyproject.toml \
36 --replace 'celery = { version = "*" }' ""
37 '';
38
39 pythonRelaxDeps = [
40 "debugpy"
41 "setuptools"
42 ];
43
44 build-system = [ poetry-core ];
45
46 buildInput = [ pytest ];
47
48 dependencies = [
49 debugpy
50 docker
51 psutil
52 pytest-docker-tools
53 setuptools
54 tenacity
55 ];
56
57 # Infinite recursion with celery
58 doCheck = false;
59
60 meta = with lib; {
61 description = "Pytest plugin to enable celery.contrib.pytest";
62 homepage = "https://github.com/celery/pytest-celery";
63 changelog = "https://github.com/celery/pytest-celery/blob/v${version}/Changelog.rst";
64 license = licenses.mit;
65 maintainers = [ ];
66 };
67}