summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/apscheduler/default.nix
blob: 1576651e77ff0ff103a07a3527300d621b172cd7 (plain)
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
{
  lib,
  stdenv,
  buildPythonPackage,
  fetchFromGitHub,
  gevent,
  pytest-asyncio,
  pytest-cov-stub,
  pytest-tornado,
  pytest8_3CheckHook,
  pytz,
  setuptools,
  setuptools-scm,
  tornado,
  twisted,
  tzlocal,
}:

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

  src = fetchFromGitHub {
    owner = "agronholm";
    repo = "apscheduler";
    tag = version;
    hash = "sha256-3KSW1RdiUXlDTr30Wrc8fYb4rRnlOn6lVhBgz3r1D/4=";
  };

  postPatch = ''
    sed -i "/addopts/d" pyproject.toml
  '';

  build-system = [
    setuptools
    setuptools-scm
  ];

  dependencies = [
    tzlocal
  ];

  nativeCheckInputs = [
    gevent
    pytest-asyncio
    pytest-cov-stub
    pytest-tornado
    pytest8_3CheckHook
    pytz
    tornado
    twisted
  ];

  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.hostPlatform.isDarwin [
    "test_submit_job"
    "test_max_instances"
  ];

  pythonImportsCheck = [ "apscheduler" ];

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