2021-03-20 04:20:00 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2022-01-13 20:06:32 +00:00
|
|
|
, aiocontextvars
|
2021-03-20 04:20:00 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, colorama
|
2022-01-13 20:06:32 +00:00
|
|
|
, fetchpatch
|
|
|
|
, fetchPypi
|
2021-03-20 04:20:00 +00:00
|
|
|
, pytestCheckHook
|
2022-01-13 20:06:32 +00:00
|
|
|
, pythonOlder
|
2021-03-20 04:20:00 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "loguru";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "0.6.0";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "setuptools";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
2021-07-21 07:28:18 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "sha256-BmvQZ1jQpRPpg2/ZxrWnW/s/02hB9LmWvGC1R6MJ1Bw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-test-repr-infinite-recursion.patch";
|
|
|
|
url = "https://github.com/Delgan/loguru/commit/4fe21f66991abeb1905e24c3bc3c634543d959a2.patch";
|
|
|
|
hash = "sha256-NUOkgUS28TOazO0txMinFtaKwsi/J1Y7kqjjvMRCnR8=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [
|
|
|
|
aiocontextvars
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
colorama
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = lib.optionals stdenv.isDarwin [
|
|
|
|
"tests/test_multiprocessing.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"test_time_rotation_reopening"
|
|
|
|
"test_file_buffering"
|
|
|
|
# Tests are failing with Python 3.10
|
|
|
|
"test_exception_others"
|
|
|
|
""
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
"test_rotation_and_retention"
|
|
|
|
"test_rotation_and_retention_timed_file"
|
|
|
|
"test_renaming"
|
|
|
|
"test_await_complete_inheritance"
|
|
|
|
];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
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
|
|
|
homepage = "https://github.com/Delgan/loguru";
|
|
|
|
description = "Python logging made (stupidly) simple";
|
|
|
|
license = licenses.mit;
|
2021-03-20 04:20:00 +00:00
|
|
|
maintainers = with maintainers; [ jakewaksbaum rmcgibbo ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|