about summary refs log tree commit diff
path: root/pkgs/development/python-modules/apscheduler/default.nix
blob: 7de46a52165149a63ce664244dac3abf41cb111e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, gevent
, pytest-asyncio
, pytest-tornado
, pytestCheckHook
, pythonOlder
, pytz
, setuptools
, setuptools-scm
, six
, tornado
, twisted
, tzlocal
}:

buildPythonPackage rec {
  pname = "apscheduler";
  version = "3.10.4";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    pname = "APScheduler";
    inherit version;
    hash = "sha256-5t8HGyfZvomOSGvHlAp75QtK8unafAjwdEqW1L1M70o=";
  };

  build-system = [
    setuptools
    setuptools-scm
  ];

  dependencies = [
    pytz
    setuptools
    six
    tzlocal
  ];

  nativeCheckInputs = [
    gevent
    pytest-asyncio
    pytest-tornado
    pytestCheckHook
    tornado
    twisted
  ];

  postPatch = ''
    substituteInPlace setup.cfg \
      --replace-fail " --cov --tb=short" ""
  '';

  disabledTests = [
    "test_broken_pool"
    # gevent tests have issue on newer Python releases
    "test_add_live_job"
    "test_add_pending_job"
    "test_shutdown"
  ] ++ lib.optionals stdenv.isDarwin [
    "test_submit_job"
    "test_max_instances"
  ];

  pythonImportsCheck = [
    "apscheduler"
  ];

  meta = with lib; {
    description = "Library that lets you schedule your Python code to be executed";
    homepage = "https://github.com/agronholm/apscheduler";
    license = licenses.mit;
    maintainers = with maintainers; [ ];
  };
}