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