Files
nixpkgs/pkgs/development/python-modules/logutils/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

66 lines
1.4 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
fetchPypi,
pytestCheckHook,
pythonAtLeast,
pythonOlder,
valkey,
redis,
setuptools,
}:
buildPythonPackage rec {
pname = "logutils";
version = "0.3.5";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-vAWKJdXCCUYfE04fA8q2N9ZqelzMEuWT21b7snmJmoI=";
};
postPatch = ''
substituteInPlace tests/test_dictconfig.py \
--replace-fail "assertEquals" "assertEqual"
substituteInPlace tests/test_redis.py \
--replace-fail "'redis-server'" "'${valkey}/bin/redis-server'"
'';
build-system = [ setuptools ];
dependencies = [
pytestCheckHook
redis
];
disabledTests = [
# https://bitbucket.org/vinay.sajip/logutils/issues/4/035-pytest-test-suite-warnings-and-errors
"test_hashandlers"
];
disabledTestPaths = [
# Disable redis tests on all systems for now
"tests/test_redis.py"
]
# lib.optionals (stdenv.hostPlatform.isDarwin) [
# # Exception: unable to connect to Redis server
# "tests/test_redis.py"
# ]
++ lib.optionals (pythonAtLeast "3.13") [
"tests/test_dictconfig.py"
];
pythonImportsCheck = [ "logutils" ];
meta = {
description = "Logging utilities";
homepage = "https://bitbucket.org/vinay.sajip/logutils/";
license = lib.licenses.bsd0;
maintainers = [ ];
};
}