1{ lib
2, aiocontextvars
3 #, aiocarbon
4, aiohttp
5 #, aiohttp-asgi
6, async-timeout
7, buildPythonPackage
8, colorlog
9, croniter
10, fastapi
11, fetchFromGitHub
12, logging-journald
13, pytestCheckHook
14, pythonOlder
15, raven
16 #, raven-aiohttp
17, setproctitle
18, uvloop
19}:
20
21buildPythonPackage rec {
22 pname = "aiomisc";
23 version = "16.2";
24 format = "setuptools";
25
26 disabled = pythonOlder "3.7";
27
28 src = fetchFromGitHub {
29 owner = "aiokitchen";
30 repo = pname;
31 rev = "refs/tags/v${version}";
32 hash = "sha256-wxm7MrFHZ7TrUGw5w7iLWs1olU8ZmJmJ7M/BZ6Nf0fU=";
33 };
34
35 propagatedBuildInputs = [
36 colorlog
37 logging-journald
38 ];
39
40 checkInputs = [
41 aiocontextvars
42 async-timeout
43 fastapi
44 pytestCheckHook
45 raven
46 setproctitle
47 ] ++ passthru.optional-dependencies.aiohttp
48 ++ passthru.optional-dependencies.cron
49 ++ passthru.optional-dependencies.uvloop;
50
51 passthru.optional-dependencies = {
52 aiohttp = [
53 aiohttp
54 ];
55 #asgi = [
56 # aiohttp-asgi
57 #];
58 cron = [
59 croniter
60 ];
61 #carbon = [
62 # aiocarbon
63 #];
64 #raven = [
65 # raven-aiohttp
66 #];
67 uvloop = [
68 uvloop
69 ];
70 };
71
72 pythonImportsCheck = [
73 "aiomisc"
74 ];
75
76 disabledTestPaths = [
77 # Dependencies are not available at the moment
78 "tests/test_entrypoint.py"
79 "tests/test_raven_service.py"
80 ];
81
82 meta = with lib; {
83 description = "Miscellaneous utils for asyncio";
84 homepage = "https://github.com/aiokitchen/aiomisc";
85 license = licenses.asl20;
86 maintainers = with maintainers; [ fab ];
87 };
88}