1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchFromGitHub,
6 gevent,
7 pytest-asyncio,
8 pytest-cov-stub,
9 pytest-tornado,
10 pytestCheckHook,
11 pythonOlder,
12 pytz,
13 setuptools,
14 setuptools-scm,
15 tornado,
16 twisted,
17 tzlocal,
18}:
19
20buildPythonPackage rec {
21 pname = "apscheduler";
22 version = "3.11.0";
23 pyproject = true;
24
25 disabled = pythonOlder "3.7";
26
27 src = fetchFromGitHub {
28 owner = "agronholm";
29 repo = "apscheduler";
30 tag = version;
31 hash = "sha256-tFEm9yXf8CqcipSYtM7JM6WQ5Qm0YtgWhZvZOBAzy+w=";
32 };
33
34 build-system = [
35 setuptools
36 setuptools-scm
37 ];
38
39 dependencies = [
40 tzlocal
41 ];
42
43 nativeCheckInputs = [
44 gevent
45 pytest-asyncio
46 pytest-cov-stub
47 pytest-tornado
48 pytestCheckHook
49 pytz
50 tornado
51 twisted
52 ];
53
54 disabledTests =
55 [
56 "test_broken_pool"
57 # gevent tests have issue on newer Python releases
58 "test_add_live_job"
59 "test_add_pending_job"
60 "test_shutdown"
61 ]
62 ++ lib.optionals stdenv.hostPlatform.isDarwin [
63 "test_submit_job"
64 "test_max_instances"
65 ];
66
67 pythonImportsCheck = [ "apscheduler" ];
68
69 meta = with lib; {
70 description = "Library that lets you schedule your Python code to be executed";
71 homepage = "https://github.com/agronholm/apscheduler";
72 license = licenses.mit;
73 maintainers = [ ];
74 };
75}