1{ 2 lib, 3 aiohttp, 4 async-timeout, 5 buildPythonPackage, 6 fetchFromGitHub, 7 pytest-aiohttp, 8 pytest-cov-stub, 9 pytestCheckHook, 10 pythonOlder, 11 setuptools, 12}: 13 14buildPythonPackage rec { 15 pname = "aiojobs"; 16 version = "1.4.0"; 17 format = "pyproject"; 18 19 disabled = pythonOlder "3.8"; 20 21 src = fetchFromGitHub { 22 owner = "aio-libs"; 23 repo = "aiojobs"; 24 tag = "v${version}"; 25 hash = "sha256-MgGUmDG0b0V/k+mCeiVRnBxa+ChK3URnGv6P8QP7RzQ="; 26 }; 27 28 nativeBuildInputs = [ setuptools ]; 29 30 propagatedBuildInputs = lib.optionals (pythonOlder "3.11") [ async-timeout ]; 31 32 optional-dependencies = { 33 aiohttp = [ aiohttp ]; 34 }; 35 36 nativeCheckInputs = [ 37 pytestCheckHook 38 pytest-aiohttp 39 pytest-cov-stub 40 ] 41 ++ lib.flatten (builtins.attrValues optional-dependencies); 42 43 pythonImportsCheck = [ "aiojobs" ]; 44 45 disabledTests = [ 46 # RuntimeWarning: coroutine 'Scheduler._wait_failed' was never awaited 47 "test_scheduler_must_be_created_within_running_loop" 48 ]; 49 50 __darwinAllowLocalNetworking = true; 51 52 meta = { 53 description = "Jobs scheduler for managing background task (asyncio)"; 54 homepage = "https://github.com/aio-libs/aiojobs"; 55 changelog = "https://github.com/aio-libs/aiojobs/blob/${src.tag}/CHANGES.rst"; 56 license = lib.licenses.asl20; 57 maintainers = with lib.maintainers; [ cmcdragonkai ]; 58 }; 59}