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