python312Packages.graphviz: fix tests with python3.12

This commit is contained in:
natsukium 2023-12-08 15:51:44 +09:00 committed by Martin Weinelt
parent ad58d74857
commit cf41f31a6c
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

@ -3,11 +3,13 @@
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, fetchpatch
, substituteAll
, graphviz
, xdg-utils
, makeFontsConf
, freefont_ttf
, setuptools
, mock
, pytest
, pytest-mock
@ -17,7 +19,7 @@
buildPythonPackage rec {
pname = "graphviz";
version = "0.20.1";
format = "setuptools";
pyproject = true;
disabled = pythonOlder "3.7";
@ -35,6 +37,12 @@ buildPythonPackage rec {
inherit graphviz;
xdgutils = xdg-utils;
})
# https://github.com/xflr6/graphviz/issues/209
(fetchpatch {
name = "fix-tests-with-python312.patch";
url = "https://github.com/xflr6/graphviz/commit/5ce9fc5de4f2284baa27d7a8d68ab0885d032868.patch";
hash = "sha256-jREPACSc4aoHY3G+39e8Axqajw4eeKkAeVu2s40v1nI=";
})
];
postPatch = ''
@ -46,6 +54,10 @@ buildPythonPackage rec {
fontDirectories = [ freefont_ttf ];
};
nativeBuildInputs = [
setuptools
];
nativeCheckInputs = [
mock
pytest