2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2023-01-20 10:41:00 +00:00
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2023-01-20 10:41:00 +00:00
|
|
|
, pytestCheckHook
|
2024-05-15 15:35:15 +00:00
|
|
|
, pythonOlder
|
2023-01-20 10:41:00 +00:00
|
|
|
, redis
|
|
|
|
, redis-server
|
2024-05-15 15:35:15 +00:00
|
|
|
, setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "logutils";
|
|
|
|
version = "0.3.5";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-vAWKJdXCCUYfE04fA8q2N9ZqelzMEuWT21b7snmJmoI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tests/test_dictconfig.py \
|
|
|
|
--replace-fail "assertEquals" "assertEqual"
|
|
|
|
substituteInPlace tests/test_redis.py \
|
|
|
|
--replace-fail "'redis-server'" "'${redis-server}/bin/redis-server'"
|
|
|
|
'';
|
|
|
|
|
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
dependencies = [
|
2023-01-20 10:41:00 +00:00
|
|
|
pytestCheckHook
|
|
|
|
redis
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# https://bitbucket.org/vinay.sajip/logutils/issues/4/035-pytest-test-suite-warnings-and-errors
|
|
|
|
"test_hashandlers"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = lib.optionals (stdenv.isDarwin) [
|
|
|
|
# Exception: unable to connect to Redis server
|
|
|
|
"tests/test_redis.py"
|
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"logutils"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Logging utilities";
|
|
|
|
homepage = "https://bitbucket.org/vinay.sajip/logutils/";
|
|
|
|
license = licenses.bsd0;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|