Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 colorama, 6 fetchFromGitHub, 7 freezegun, 8 pytestCheckHook, 9 pythonOlder, 10 pytest-xdist 11}: 12 13buildPythonPackage rec { 14 pname = "loguru"; 15 version = "0.7.2"; 16 format = "setuptools"; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "Delgan"; 22 repo = pname; 23 rev = "refs/tags/${version}"; 24 hash = "sha256-1xcPAOOhjFmWSxmPj6NICRur3ITOuQRNNKPJlfp89Jw="; 25 }; 26 27 nativeCheckInputs = [ 28 pytestCheckHook 29 pytest-xdist # massive speedup, not tested by upstream 30 colorama 31 freezegun 32 ]; 33 34 disabledTestPaths = [ 35 "tests/test_type_hinting.py" # avoid dependency on mypy 36 ] ++ lib.optionals stdenv.isDarwin [ "tests/test_multiprocessing.py" ]; 37 38 disabledTests = 39 [ 40 # fails on some machine configurations 41 # AssertionError: assert '' != '' 42 "test_file_buffering" 43 # Slow test 44 "test_time_rotation" 45 ] 46 ++ lib.optionals stdenv.isDarwin [ 47 "test_rotation_and_retention" 48 "test_rotation_and_retention_timed_file" 49 "test_renaming" 50 "test_await_complete_inheritance" 51 ]; 52 53 pythonImportsCheck = [ "loguru" ]; 54 55 meta = with lib; { 56 description = "Python logging made (stupidly) simple"; 57 homepage = "https://github.com/Delgan/loguru"; 58 changelog = "https://github.com/delgan/loguru/releases/tag/${version}"; 59 license = licenses.mit; 60 maintainers = with maintainers; [ 61 jakewaksbaum 62 rmcgibbo 63 ]; 64 }; 65}