1{ lib
2, stdenv
3, buildPythonPackage
4, colorama
5, fetchFromGitHub
6, freezegun
7, pytestCheckHook
8, pythonOlder
9}:
10
11buildPythonPackage rec {
12 pname = "loguru";
13 version = "0.7.2";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "Delgan";
20 repo = pname;
21 rev = "refs/tags/${version}";
22 hash = "sha256-1xcPAOOhjFmWSxmPj6NICRur3ITOuQRNNKPJlfp89Jw=";
23 };
24
25 nativeCheckInputs = [
26 pytestCheckHook
27 colorama
28 freezegun
29 ];
30
31 disabledTestPaths = [
32 "tests/test_type_hinting.py" # avoid dependency on mypy
33 ] ++ lib.optionals stdenv.isDarwin [
34 "tests/test_multiprocessing.py"
35 ];
36
37 disabledTests = [
38 # fails on some machine configurations
39 # AssertionError: assert '' != ''
40 "test_file_buffering"
41 ] ++ lib.optionals stdenv.isDarwin [
42 "test_rotation_and_retention"
43 "test_rotation_and_retention_timed_file"
44 "test_renaming"
45 "test_await_complete_inheritance"
46 ];
47
48 pythonImportsCheck = [
49 "loguru"
50 ];
51
52 meta = with lib; {
53 description = "Python logging made (stupidly) simple";
54 homepage = "https://github.com/Delgan/loguru";
55 changelog = "https://github.com/delgan/loguru/releases/tag/${version}";
56 license = licenses.mit;
57 maintainers = with maintainers; [ jakewaksbaum rmcgibbo ];
58 };
59}