1{ lib
2, aiohttp
3, async-timeout
4, buildPythonPackage
5, fetchFromGitHub
6, pytest-aiohttp
7, pytestCheckHook
8, pythonOlder
9, setuptools
10}:
11
12buildPythonPackage rec {
13 pname = "aiojobs";
14 version = "1.1.0";
15 format = "pyproject";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "aio-libs";
21 repo = pname;
22 rev = "refs/tags/v${version}";
23 hash = "sha256-FHdEVt/XXmuTrPAETyod3fHJIK1wg957/+QMAhZG1xk=";
24 };
25
26 postPatch = ''
27 substituteInPlace setup.cfg \
28 --replace "--cov=aiojobs/ --cov=tests/" ""
29 '';
30
31 nativeBuildInputs = [
32 setuptools
33 ];
34
35 propagatedBuildInputs = [
36 aiohttp
37 async-timeout
38 ];
39
40 nativeCheckInputs = [
41 pytestCheckHook
42 pytest-aiohttp
43 ];
44
45 pythonImportsCheck = [
46 "aiojobs"
47 ];
48
49 meta = with lib; {
50 description = "Jobs scheduler for managing background task (asyncio)";
51 homepage = "https://github.com/aio-libs/aiojobs";
52 changelog = "https://github.com/aio-libs/aiojobs/blob/v${version}/CHANGES.rst";
53 license = licenses.asl20;
54 maintainers = with maintainers; [ cmcdragonkai ];
55 };
56}