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