at 22.05-pre 1.5 kB view raw
1{ lib 2, stdenv 3, buildPythonPackage 4, fetchPypi 5, fetchpatch 6, isPy27 7, colorama 8, pytestCheckHook 9}: 10 11buildPythonPackage rec { 12 pname = "loguru"; 13 version = "0.5.3"; 14 15 disabled = isPy27; 16 17 src = fetchPypi { 18 inherit pname version; 19 sha256 = "b28e72ac7a98be3d28ad28570299a393dfcd32e5e3f6a353dec94675767b6319"; 20 }; 21 22 patches = [ 23 # Fixes tests with pytest>=6.2.2. Will be part of the next release after 0.5.3 24 (fetchpatch { 25 url = "https://github.com/Delgan/loguru/commit/31cf758ee9d22dbfa125f38153782fe20ac9dce5.patch"; 26 sha256 = "1lzbs8akg1s7s6xjl3samf4c4bpssqvwg5fn3mwlm4ysr7jd5y67"; 27 }) 28 # fix tests with Python 3.9 29 (fetchpatch { 30 url = "https://github.com/Delgan/loguru/commit/19f518c5f1f355703ffc4ee62f0e1e397605863e.patch"; 31 sha256 = "0yn6smik58wdffr4svqsy2n212fwdlcfcwpgqhl9hq2zlivmsdc6"; 32 }) 33 ]; 34 35 checkInputs = [ pytestCheckHook colorama ]; 36 37 disabledTestPaths = lib.optionals stdenv.isDarwin [ "tests/test_multiprocessing.py" ]; 38 disabledTests = [ "test_time_rotation_reopening" "test_file_buffering" ] 39 ++ lib.optionals stdenv.isDarwin [ "test_rotation_and_retention" "test_rotation_and_retention_timed_file" "test_renaming" "test_await_complete_inheritance" ]; 40 41 meta = with lib; { 42 homepage = "https://github.com/Delgan/loguru"; 43 description = "Python logging made (stupidly) simple"; 44 license = licenses.mit; 45 maintainers = with maintainers; [ jakewaksbaum rmcgibbo ]; 46 }; 47}