2021-03-23 22:49:02 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, fetchpatch
|
|
|
|
, isPy27
|
|
|
|
, colorama
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonAtLeast
|
|
|
|
}:
|
2019-07-03 03:20:21 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "loguru";
|
2020-09-30 05:51:57 +01:00
|
|
|
version = "0.5.3";
|
2020-08-25 03:07:09 +01:00
|
|
|
|
2021-03-23 22:49:02 +00:00
|
|
|
# python3.9 compatibility should be in the next release after 0.5.3
|
|
|
|
disabled = isPy27 || pythonAtLeast "3.9";
|
2019-07-03 03:20:21 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-09-30 05:51:57 +01:00
|
|
|
sha256 = "b28e72ac7a98be3d28ad28570299a393dfcd32e5e3f6a353dec94675767b6319";
|
2019-07-03 03:20:21 +01:00
|
|
|
};
|
|
|
|
|
2021-03-23 22:49:02 +00:00
|
|
|
patches = [
|
|
|
|
# Fixes tests with pytest>=6.2.2. Will be part of the next release after 0.5.3
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/Delgan/loguru/commit/31cf758ee9d22dbfa125f38153782fe20ac9dce5.patch";
|
|
|
|
sha256 = "1lzbs8akg1s7s6xjl3samf4c4bpssqvwg5fn3mwlm4ysr7jd5y67";
|
|
|
|
})
|
|
|
|
];
|
2019-07-03 03:20:21 +01:00
|
|
|
|
2021-03-23 22:49:02 +00:00
|
|
|
checkInputs = [ pytestCheckHook colorama ];
|
2020-08-14 05:21:00 +01:00
|
|
|
|
2021-03-23 22:49:02 +00:00
|
|
|
disabledTestPaths = lib.optionals stdenv.isDarwin [ "tests/test_multiprocessing.py" ];
|
2020-01-04 09:20:00 +00:00
|
|
|
disabledTests = [ "test_time_rotation_reopening" "test_file_buffering" ]
|
2021-01-24 00:29:22 +00:00
|
|
|
++ lib.optionals stdenv.isDarwin [ "test_rotation_and_retention" "test_rotation_and_retention_timed_file" "test_renaming" "test_await_complete_inheritance" ];
|
2020-01-04 09:20:00 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/Delgan/loguru";
|
2019-07-03 03:20:21 +01:00
|
|
|
description = "Python logging made (stupidly) simple";
|
|
|
|
license = licenses.mit;
|
2021-03-23 22:49:02 +00:00
|
|
|
maintainers = with maintainers; [ jakewaksbaum rmcgibbo ];
|
2019-07-03 03:20:21 +01:00
|
|
|
};
|
|
|
|
}
|