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