at 23.05-pre 1.5 kB view raw
1{ lib 2, stdenv 3, aiocontextvars 4, buildPythonPackage 5, colorama 6, fetchpatch 7, fetchPypi 8, pytestCheckHook 9, pythonOlder 10}: 11 12buildPythonPackage rec { 13 pname = "loguru"; 14 version = "0.6.0"; 15 format = "setuptools"; 16 17 disabled = pythonOlder "3.5"; 18 19 src = fetchPypi { 20 inherit pname version; 21 sha256 = "sha256-BmvQZ1jQpRPpg2/ZxrWnW/s/02hB9LmWvGC1R6MJ1Bw="; 22 }; 23 24 patches = [ 25 (fetchpatch { 26 name = "fix-test-repr-infinite-recursion.patch"; 27 url = "https://github.com/Delgan/loguru/commit/4fe21f66991abeb1905e24c3bc3c634543d959a2.patch"; 28 hash = "sha256-NUOkgUS28TOazO0txMinFtaKwsi/J1Y7kqjjvMRCnR8="; 29 }) 30 ]; 31 32 propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [ 33 aiocontextvars 34 ]; 35 36 checkInputs = [ 37 pytestCheckHook 38 colorama 39 ]; 40 41 disabledTestPaths = lib.optionals stdenv.isDarwin [ 42 "tests/test_multiprocessing.py" 43 ]; 44 45 disabledTests = [ 46 "test_time_rotation_reopening" 47 "test_file_buffering" 48 # Tests are failing with Python 3.10 49 "test_exception_others" 50 "" 51 ] ++ lib.optionals stdenv.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 = [ 59 "loguru" 60 ]; 61 62 meta = with lib; { 63 homepage = "https://github.com/Delgan/loguru"; 64 description = "Python logging made (stupidly) simple"; 65 license = licenses.mit; 66 maintainers = with maintainers; [ jakewaksbaum rmcgibbo ]; 67 }; 68}