mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-14 14:16:35 +01:00
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
62 lines
1.3 KiB
Nix
62 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPythonPackage,
|
|
fetchPypi,
|
|
pytestCheckHook,
|
|
pythonAtLeast,
|
|
valkey,
|
|
redis,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "logutils";
|
|
version = "0.3.5";
|
|
pyproject = true;
|
|
|
|
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 = [ ];
|
|
};
|
|
}
|