2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
colorama,
|
|
|
|
fetchFromGitHub,
|
|
|
|
freezegun,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2024-06-20 14:57:18 +00:00
|
|
|
pytest-xdist
|
2021-03-20 04:20:00 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "loguru";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.7.2";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "setuptools";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-07-21 07:28:18 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Delgan";
|
|
|
|
repo = pname;
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-1xcPAOOhjFmWSxmPj6NICRur3ITOuQRNNKPJlfp89Jw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-01-13 20:06:32 +00:00
|
|
|
pytestCheckHook
|
2024-06-20 14:57:18 +00:00
|
|
|
pytest-xdist # massive speedup, not tested by upstream
|
2022-01-13 20:06:32 +00:00
|
|
|
colorama
|
2023-02-02 18:25:31 +00:00
|
|
|
freezegun
|
2022-01-13 20:06:32 +00:00
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"tests/test_type_hinting.py" # avoid dependency on mypy
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "tests/test_multiprocessing.py" ];
|
2024-06-05 15:53:02 +00:00
|
|
|
|
|
|
|
disabledTests =
|
|
|
|
[
|
|
|
|
# fails on some machine configurations
|
|
|
|
# AssertionError: assert '' != ''
|
|
|
|
"test_file_buffering"
|
2024-06-20 14:57:18 +00:00
|
|
|
# Slow test
|
|
|
|
"test_time_rotation"
|
2024-06-05 15:53:02 +00:00
|
|
|
]
|
2024-09-26 11:04:55 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2024-06-05 15:53:02 +00:00
|
|
|
"test_rotation_and_retention"
|
|
|
|
"test_rotation_and_retention_timed_file"
|
|
|
|
"test_renaming"
|
|
|
|
"test_await_complete_inheritance"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "loguru" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python logging made (stupidly) simple";
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = "https://github.com/Delgan/loguru";
|
|
|
|
changelog = "https://github.com/delgan/loguru/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
jakewaksbaum
|
|
|
|
rmcgibbo
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|