2020-08-18 16:06:46 +00:00
|
|
|
{ lib
|
2020-08-22 21:36:40 +00:00
|
|
|
, stdenv
|
2020-08-18 16:06:46 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, humanfriendly
|
|
|
|
, verboselogs
|
|
|
|
, capturer
|
|
|
|
, pytest
|
|
|
|
, mock
|
2020-11-24 15:29:28 +00:00
|
|
|
, util-linux
|
2020-08-18 16:06:46 +00:00
|
|
|
}:
|
2019-07-23 14:59:14 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "coloredlogs";
|
2021-03-10 13:20:48 +00:00
|
|
|
version = "15.0";
|
2019-07-23 14:59:14 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xolox";
|
|
|
|
repo = "python-coloredlogs";
|
|
|
|
rev = version;
|
2021-03-10 13:20:48 +00:00
|
|
|
sha256 = "sha256-C1Eo+XrrL3bwhT49KyOE6xjbAHJxn9Qy4s1RR5ERVtA=";
|
2019-07-23 14:59:14 +00:00
|
|
|
};
|
|
|
|
|
2020-08-22 21:36:40 +00:00
|
|
|
# capturer is broken on darwin / py38, so we skip the test until a fix for
|
|
|
|
# https://github.com/xolox/python-capturer/issues/10 is released.
|
2021-01-26 18:10:40 +00:00
|
|
|
doCheck = !stdenv.isDarwin;
|
2019-07-23 14:59:14 +00:00
|
|
|
checkPhase = ''
|
2019-10-17 21:57:48 +00:00
|
|
|
PATH=$PATH:$out/bin pytest . -k "not test_plain_text_output_format \
|
|
|
|
and not test_auto_install"
|
2019-07-23 14:59:14 +00:00
|
|
|
'';
|
2020-08-22 21:36:40 +00:00
|
|
|
checkInputs = [ pytest mock util-linux verboselogs capturer ];
|
2019-07-23 14:59:14 +00:00
|
|
|
|
2020-08-22 21:36:40 +00:00
|
|
|
pythonImportsCheck = [ "coloredlogs" ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ humanfriendly ];
|
2019-07-23 14:59:14 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Colored stream handler for Python's logging module";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/xolox/python-coloredlogs";
|
2019-07-23 14:59:14 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ eyjhb ];
|
|
|
|
};
|
|
|
|
}
|