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