ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / loguru / default.nix
blob9c0d88df644d2750747b3979b6c6b47250060ee1
1 { lib
2 , stdenv
3 , aiocontextvars
4 , buildPythonPackage
5 , colorama
6 , fetchpatch
7 , fetchPypi
8 , pytestCheckHook
9 , pythonOlder
12 buildPythonPackage rec {
13   pname = "loguru";
14   version = "0.6.0";
15   format = "setuptools";
17   disabled = pythonOlder "3.5";
19   src = fetchPypi {
20     inherit pname version;
21     sha256 = "sha256-BmvQZ1jQpRPpg2/ZxrWnW/s/02hB9LmWvGC1R6MJ1Bw=";
22   };
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   ];
32   propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [
33     aiocontextvars
34   ];
36   checkInputs = [
37     pytestCheckHook
38     colorama
39   ];
41   disabledTestPaths = lib.optionals stdenv.isDarwin [
42     "tests/test_multiprocessing.py"
43   ];
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   ];
58   pythonImportsCheck = [
59     "loguru"
60   ];
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   };