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