python312Packages.logilab-common: fix test failure on Python 3.12

This commit is contained in:
Fabian Affolter 2024-05-02 23:47:56 +02:00
parent 241f40db93
commit fe32cf5c0e

View File

@ -4,6 +4,7 @@
, importlib-metadata
, mypy-extensions
, pytestCheckHook
, pythonAtLeast
, pythonOlder
, pytz
, setuptools
@ -22,6 +23,11 @@ buildPythonPackage rec {
hash = "sha256-ojvR2k3Wpj5Ej0OS57I4aFX/cGFVeL/PmT7riCTelws=";
};
postPatch = lib.optionals (pythonAtLeast "3.12") ''
substituteInPlace logilab/common/testlib.py \
--replace-fail "_TextTestResult" "TextTestResult"
'';
build-system = [
setuptools
];